@Efren, @Raphael is correct. isTarget() returns a boolean (yes/no), getSelfTargetID() returns the actual ID of your character's target.

@Blequi, that's a bad, bad way to get it. Just use getSelfTargetID()
Code:
local Target = Creature.GetByID(getSelfTargetID())
----then use Target:Name() to return your target's name