Incorrect specification of isinstance