code: protected function filterUriInstance($uri): string
      {
          if ($uri instanceof UriInterface) {
              return (string) $uri;
          }
  
          if (is_string($uri)) {
              return (string) \One\createUriFromString($uri);
          }
  
          return '';
      }
docs: Make Sure Uri is a Psr\Http\Message\UriInterface instance
  
  @param \Psr\Http\Message\UriInterface|string|null $uri