added NaN test for sort
added NaN test for sort_indices