Added explicit checks for null and undefined in unwrappedData.sort

Otherwise, zeroes were passing, and not getting properly sorted