Is there any sugar to ensure that map will not typeerror using tools like optional chaining/nullishcoalescing?
let x = {y: 1, z: 2};
x?.map(i => i); // Typeerror
Array.isArray(x)?.map(i => i); // Typeerror
let y = '1234';
y?.length && y.map(i => i) // Typeerror