public static Path toPath(Expression expression) {
    return maybePath(expression).orElseThrow(() -> ERROR_FN.apply(expression, Path.class));
  }
Assumes current expression is a {@link Path}. Throws exception when it is not.
criteria/common/src/org/immutables/criteria/expression/Visitors.java