Add checkNodes() functionality