Instead of type checking we should define an API with a default implementation and implement it in a different way on Array