added is_nan and has_nan for Q2D and Q3D