If that's an error then so is passing in a non number.
So catch 22. You can only check for valid numbers if the number is valid?