@Nullable
  public static String getSchemeOrNull(@Nullable Uri uri) {
    return uri == null ? null : uri.getScheme();
  }
@param uri uri to extract scheme from, possibly null
@return null if uri is null, result of uri.getScheme() otherwise
fbcore/src/main/java/com/facebook/common/util/UriUtil.java