I have a function which parses the address components of the Google Maps API JSON and then returns the city / locality / route name.
The getAddre
What you want is a null coalescent operator.
Javascript doesn't have one. Most of the time peoples use the logical OR || for this purpose but it doesn't work on property access.
There's proposal for adding null coalescing to the language, but it's nowhere near:
https://github.com/tc39/proposal-nullish-coalescing
https://tc39.github.io/proposal-nullish-coalescing/
If you really, really, absolutly want to use it you can use this Babel plugin:
https://www.npmjs.com/package/babel-plugin-transform-optional-chaining
But I would strongly suggest you don't: this may never make it to the language and you would have unvalid code in your codebase.