how to check if string isdigit