String targetPropertyName = targetPropertyType.getPropertyName();
final PropertyName expr = ff.property(targetPropertyName);
Collections.sort(list, new Comparator<Object>() {
@Override
public int compare(Object o1, Object o2) {
Object v1 = expr.evaluate(o1);
Object v2 = expr.evaluate(o2);
String m1 = marshalValue(v1);
String m2 = marshalValue(v2);
return m1 == null ? (m2 == null ? 0 : -1) : (m2 == null ? 1
: m1.compareTo(m2));