fix NaN comparison in comparator
- currently if an item has a NaN value, it remains in-place,
  causing other values to not sort in order.
- this change treats NaN/null/undefined as -ve infinity,
  so the element is at top of the list of a descending sort