i've used the practice from coffeescript conversion:
`a?`  converts to `typeof a !== "undefined" && a !== null;`