Changed the function that checks for numbers.