added NaN test for check_ldlt_factor