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

FYI this commit passed on my fork so we can safely merge this: https://travis-ci.org/shoyer/pandas/builds/53882855
 ok, looks ok to me. go ahead and merge.
