TST/DOC: Fix tests and docs for .cat raising AttributeError if invalid
Follow-up on #9617

Fixes #8814 -- is it fair to say that `hasattr(s, 'cat')` is probably
the best solution we're going to come up with for checking for categorical
data?

CC @jreback @jorisvandenbossche @JanSchulz
