code: @Override
      public boolean toBoolean(Object val) {
          if (val == null) {
              controlNullOperand();
              return false;
          } else if (val instanceof Boolean) {
              return (Boolean) val;
          } else if (val instanceof Number) {
              double number = toDouble(val);
              return !Double.isNaN(number) && number != 0.d;
          } else if (val instanceof String) {
              String strval = val.toString();
              return strval.length() > 0 && !"false".equals(strval);
          } else if (val instanceof Collection) {
              return CollectionUtils.isNotEmpty((Collection) val);
          }
  
          return true;
      }
docs: using the original implementation
  added check for empty lists
  defaulting to "true"