toqueteos idea to use isinstance instead of type