REF: Pre-empt TypeError in groupby
cc @WillAyd @jreback, should be orthogonal to #29228.
Was this `TypeError` ever tested?  Is it possible to cover in the tests? > Was this TypeError ever tested? Is it possible to cover in the tests?

The `pass` on L225 is currently reached in the tests.  The `raise` on L227 is not. k looks fine (hopefully you have followons!). rebase and ping on green. ping Thanks @jbrockmendel 