Handle nils when totalling