alive

Returns the boolean if the UNIT is alive, otherwise false.

alive([UnitId]) : boolean
1. See Wowpedia for more information on WoW Unit IDs. Will default to 'player' if nothing is specified as an argument.

Example

if alive('target') then
return cast(Frostbolt, 'target')
end

Note

This uses UnitIsDeadOrGhost(unit), returning boolean.