python function to check for integer