Check for == null instead of === undefined