added NaN test for qr_Q
added NaN test for qr_R