Handle NaNs correctly using masked arrays and handle masked arrays correctly for estimating MFPT results.