Don't crash when sorting an empty list.