python check if variable is int or str