code: public static function parseValue($value)
      {
          if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
              throw new \UnexpectedValueException("Cannot represent value as email: " . Utils::printSafe($value));
          }
          return $value;
      }
docs: Parses an externally provided value (query variable) to use as an input
  
  @param mixed $value
  @return mixed