added NaN test for check_vector
added doc in code for check_vector