python check if variable is integer or float