The isinf command checks whether its argument is an infinity (unsigned, positive or negative) or not.
The isnan command checks whether its argument is undefined or not.