python check if value is integer or float