check undefined object javascript one liner set to emtpy

JavaScript
const isEmpty = Object.values(object).every(x => (x === null || x === ''));console.log(myVar == null ? myVar.myProp : 'fallBackValue');
Source

Also in JavaScript: