Validates if input is a number