Use is_integer on floats.
Make use of is_integer.