added NaN test for check_positive_finite
added doc in code for check_positive_finite