added a check for input of type=number