nextLevelRoot !== null
should be
nextLevelRoot === null
Probably you are talking about ‘Try it yourself’ section for JS. We have fixed it. Thanks for pointing this out.