code: public static String checkUri(String uri,
                                    @Nullable String errorMessageTemplate,
                                    @Nullable Object... errorMessageArgs) {
          checkArgument(uri != null, "Expected non-null uri");
          checkArgument(uri.length() > 0 && uri.length() < 2000,
                  "Expected a email in range 1 to 2000 characters, got %s", uri.length());
          return check(uri, isValidURI(), errorMessageTemplate, errorMessageArgs);
      }
docs: Performs URI check against RFC 2396 specification
  
  @param uri the URI to check
  @return the checked uri
  @throws IllegalArgumentException if the {@code uri} is invalid
  @throws NullPointerException     if the {@code uri} is null
  @see java.net.URI