fun Iterable<ContractState>.sumCommoditiesOrNull(): Amount<Issued<Commodity>>?
Sums the cash states in the list, returning null if there are none.