Remove all isinstance() calls in favour of duck typing in Werkzeug Structures