Reintroduced functionToAllNodesOfType.