if node.exists and not isinstance(old_val, list):
                value_type = type(old_val).__name__
                msg = (
                    "Path {0!r} contains an element of non-array type "
                    "{1!r}".format(str(node), value_type)