added NaN test for sd