docs: def valid_url(x: str) -> bool:
      """
      Return ``True`` if ``x`` is a valid URL; otherwise return ``False``.
      """
      if isinstance(x, str) and re.match(URL_PATTERN, x):
          return True
      else:
          return False