Nullish coalescing and optional chaining in JavaScript