testing if a number is a valid number