Support old-style classes in Python 2

`type(s) is type` doesn't work for old-style classes, but `inspect.isclass()` handles both old-style and new-style classes.