code: public static boolean toBoolean(Object value, EvaluationContext ctx) {
          if (value instanceof Boolean) {
              return (Boolean) value;
          }
          else if (value instanceof Integer) {
              return ((Integer) value) != 0;
          }
          else if (value instanceof BigDecimal) {
              return !value.equals(BigDecimal.ZERO);
          }
          else if (value instanceof String) {
              String strVal = (String) value;
              if (strVal.equalsIgnoreCase("TRUE")) {
                  return true;
              }  else if (strVal.equalsIgnoreCase("FALSE")) {
                  return false;
              }
          }
          else if (value instanceof LocalDate || value instanceof OffsetTime || value instanceof ZonedDateTime) {
              return true;
          }
  
          throw new EvaluationError("Can't convert '" + value + "' to a boolean");
      }
docs: Tries conversion of any value to a boolean (called a 'Logical Value' in Excel lingo)