Fix argument error.

After further testing and investigation, I found that the ArgumentError was
actually being raised by the sort method itself and not the <=> comparison,
when <=> returned an unexpected value for the comparison to sort (e.g. nil).