code: static void checkArgument(boolean check, String msg, Object... args) {
      if (!check) {
        throw new IllegalArgumentException(String.format(msg, args));
      }
    }
docs: Throws IllegalArgumentException with the given message if the check is false.