code: public static void checkNotEmpty(CharSequence str, String message) {
      if (str == null || str.length() == 0) {
        throw new IllegalArgumentException(message);
      }
    }
docs: Throws an exception with a message, when CharSequence is null
  
  @param str is a CharSequence to examine
  @param message for IllegalArgumentException