Question: how to check for null and undefined in js?
Answer: Comparisons can be made: null === null to check strictly for null or null == undefined to check loosely for either null or undefined. The value null is falsy, but empty objects are truthy, so typeof maybeNull === "object" && ! maybeNull is an easy way to check that a value is not null .