Yes. Generally speaking, the chain of isinstance is definitively smelly and one should think of a better way of implementing the underlying logic.