function to check if a string is a number,isdigit()