fun Iterable<ContractState>.sumCommoditiesOrNull(): <ERROR CLASS>
Sums the cash states in the list, returning null if there are none.