code: public static boolean isConstant(Expression expression, Object expected) {
          return expression instanceof ConstantExpression && expected.equals(((ConstantExpression) expression).getValue());
      }
docs: Tells you if an expression is the expected constant.
  @param expression
  any expression
  @param expected
  the expected int or String
  @return
  as described