docs: public static boolean castToBoolean(Object object) {
          // null is always false
          if (object == null) {
              return false;
          }
  
          // equality check is enough and faster than instanceof check, no need to check superclasses since Boolean is final
          if (object.getClass() == Boolean.class) {
              return (Boolean) object;
          }
  
          // if the object is not null and no Boolean, try to call an asBoolean() method on the object
          return (Boolean) InvokerHelper.invokeMethod(object, "asBoolean", InvokerHelper.EMPTY_ARGS);
      }