Check against both null and undefined for fs.Stat spec