fix optimisation of isinstance(X, type)