Optional chaining is definitely a great solution for the same problem!
But the solution I described here is not misguided, just another solution to a problem.
The thing with optional chaining is, not all major browsers do support it. Of course, we have Babel and Typescript that do support it š