code: @SuppressWarnings("unchecked")
      public static <T> Expression<T> extract(Expression<T> expr) {
          if (expr != null) {
              final Class<?> clazz = expr.getClass();
              if (clazz == PathImpl.class || clazz == PredicateOperation.class || clazz == ConstantImpl.class) {
                  return expr;
              } else {
                  return (Expression<T>) expr.accept(ExtractorVisitor.DEFAULT, null);
              }
          } else {
              return null;
          }
      }
docs: Get the potentially wrapped expression
  
  @param expr expression to analyze
  @return inner expression