[python] How to check if a float value is a whole number