Update of pa_moment to catch NaN case.