fun <P> Iterable<ContractState>.sumObligationsOrNull(): Amount<P>?
Sums the obligation states in the list, returning null if there are none.