introducing asserts for every node type