Validates if a value is number.