python check if variable is numeric