You could modify the implementation of sort to reflect this behavior.
But if you know that there will be "null" objects, you should perhaps prefer lists ... this would speed up the sorting as well ...
But if you know that there will be "null" objects, you should perhaps prefer lists ... this would speed up the sorting as well ...