The children function needs to use the `isNode` function from the context to check whether nodes are actually nodes