IsUnitType(u, UNIT_TYPE_DEAD)[ works fine actually because it will return true if the unit is dead, but in case the unit refers to null it would return false since a non existing unit can´t be dead. We have a thread somewhere in jass sections about that issue.
~Greets