Use isinstance for checking class type.

Thanks, Tivec. This allows wheel.py to work with python 2.