Fix is_integer function.