code: public static boolean onCheckMainThread(BooleanSupplier defaultChecker) {
      if (defaultChecker == null) {
        throw new NullPointerException("defaultChecker == null");
      }
      BooleanSupplier current = onCheckMainThread;
      try {
        if (current == null) {
          return defaultChecker.getAsBoolean();
        } else {
          return current.getAsBoolean();
        }
      } catch (Exception ex) {
        throw Exceptions.propagate(ex);
      }
    }
docs: Returns {@code true} if called on the main thread, {@code false} if not. This will prefer a set
  checker via {@link #setOnCheckMainThread(BooleanSupplier)} if one is present, otherwise it will
  use {@code defaultChecker}.
  
  @param defaultChecker the default checker to fall back to if there is no main thread checker
  set.
  @return {@code true} if called on the main thread, {@code false} if not.