Fix NullPointer caused by no sort or filter criteria when using a ToOne lookup.