Prevent TypeError from being raised from issubclass