added NaN test for mean
added NaN test for variance