Add a :type to excpetion on schema fail
Fix error checking in execute-and-flag
Add count-by and count-values to pallet.utils