Or a set theoretic type system with union type declarations (foo|null), like in TypeScript.