code: function getEmailIfValid(emailToVerify) {
    if (emailToVerify) {
      const email = emailToVerify.trim();
      if (emailRegex.test(email)) {
        return email;
      } else {
        return undefined;
      }
    }
  }
docs: /*
  Checks if a given email address is syntactically valid.
  @param emailToVerify the email address to verify
  @return the valid email address, stipped from whitespace if it is valid, null
  otherwise