is_wholenumber function

Test whether x is a whole number