code: public static void checkArgument(
        boolean isValid, @javax.annotation.Nullable Object errorMessage) {
      if (!isValid) {
        throw new IllegalArgumentException(String.valueOf(errorMessage));
      }
    }
docs: Throws an {@link IllegalArgumentException} if the argument is false. This method is similar to
  {@code Preconditions.checkArgument(boolean, Object)} from Guava.
  
  @param isValid whether the argument check passed.
  @param errorMessage the message to use for the exception. Will be converted to a string using
  {@link String#valueOf(Object)}.