src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js
function getSortComparator(fnCompare) {
		return function(vValue1, vValue2) {
			if (vValue1 === vValue2) {
				return 0;
			}
			if (vValue1 === null) {
				return -1;
			}
			if (vValue2 === null) {
				return 1;
			}
			return fnCompare(vValue1, vValue2);
		};
	}
function getSortComparator(fnCompare) {
		return function(vValue1, vValue2) {
			if (vValue1 === vValue2) {
				return 0;
			}
			if (vValue1 === null) {
				return -1;
			}
			if (vValue2 === null) {
				return 1;
			}
			return fnCompare(vValue1, vValue2);
		};
	}
function getSortComparator ( fnCompare ) { return function ( vValue1 , vValue2 ) { if ( vValue1 === vValue2 ) { return 0 ; } if ( vValue1 === null ) { return - 1 ; } if ( vValue2 === null ) { return 1 ; } return fnCompare ( vValue1 , vValue2 ) ; } ; }
Creates a comparator usable for sorting.

The OData comparators return "NaN" for comparisons containing null values. While this is a valid result when used for filtering,
for sorting the null values need to be put in order, so the comparator must return either -1 or 1 instead, to have null sorted
at the top in ascending order and on the bottom in descending order.

@private
Creates a comparator usable for sorting .