private static boolean isValidFileSystemUri(URI uri) {
    // would like to just check null, but fragment appears to be the empty string when not present
    return isNullOrEmpty(uri.getPath())
        && isNullOrEmpty(uri.getQuery())
        && isNullOrEmpty(uri.getFragment());
  }
Returns whether or not the given URI is valid as a base file system URI. It must not have a
path, query or fragment.
jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java