added NaN test for check_cholesky_factor
added doc in code for check_cholesky_factor