Better error handling in madlib.summary