Fixing NPE  when calculating total for payments without a payment type