Fix a nil pointer error in the form validations.