code: public static void assertNotNull(final Object object, final String message) {
      if (object == null) {
        throw new NullPointerException(message == null ? "Object is null" : message);
      }
    }
docs: Check that an object is null and throw NullPointerException in the case.
  
  @param object  an object to be checked
  @param message message to be used as the exception message
  @throws NullPointerException it will be thrown if the object is null