Fix `TypeError` on `GeneratorType` instance checking.