you could just do the integer check first, and if that does not pass, see if it is a floating point number.