fix email validation, when email is nil an error is not expected