BUG: Fix a bug when indexing np.nan via loc/iloc (GH5016)