Handle cases of NaN in comparing 2x survival curves

If e.g. last 2x values for 'n' are zero, calculation of variance will
fail for numerical reasons.