code: public static boolean isConstantOrLiteral(Expression expression) {
          if (expression instanceof ConstantExpression) return true;
          if (expression instanceof ListExpression) return true;
          if (expression instanceof MapExpression) return true;
          return isPredefinedConstant(expression);
      }
docs: Tells you if an expression is a constant or literal. Basically, is it a map, list, constant, or a predefined
  constant like true/false.
  @param expression
  any expression
  @return
  as described