python check if string can convert to int