Function that checks if a passed-in value is an integer