Switch val check to val === null