code: @Nullable
    public static URL getAsURL (@Nullable final String sURL, final boolean bWhine)
    {
      if (StringHelper.hasText (sURL))
        try
        {
          return new URL (sURL);
        }
        catch (final MalformedURLException ex)
        {
          // fall-through
          if (bWhine && GlobalDebug.isDebugMode ())
            if (LOGGER.isWarnEnabled ())
              LOGGER.warn ("Debug warn: failed to convert '" + sURL + "' to a URL!");
        }
      return null;
    }
docs: Get the passed String as an URL. If the string is empty or not an URL
  <code>null</code> is returned.
  
  @param sURL
  Source URL. May be <code>null</code>.
  @param bWhine
  <code>true</code> to debug log if conversion failed
  @return <code>null</code> if the passed URL is empty or invalid.