python check if string value is int or float