code: public function parseValue($value)
      {
          if (!is_string($value) || !filter_var($value, FILTER_VALIDATE_URL)) { // quite naive, but after all this is example
              throw new Error("Cannot represent value as URL: " . Utils::printSafe($value));
          }
          return $value;
      }
docs: Parses an externally provided value (query variable) to use as an input
  
  @param mixed $value
  @return mixed
  @throws Error