if splitting_node and not isinstance(splitting_node, Node):
            raise ValueError("Expected node, got {}".format(type(splitting_node)))