API: raise TypeError out of GroupBy.agg

Fixes #3238