Fix NPE in Lettuce sort