new method for detecting strings that are numbers