Check `thing` is a class before checking `issubclass(...)`

Needed when `thing` is a string, like `"c"` or `"I"`(as in the generated `xcffib/randr.py` class `GetScreenResolutionReply`)