let stringOrNullValue: string | null = null; //it an take null as well as other type. stringOrNullValue = "someString";
let x = foo ?? bar(); // return foo if it's not null or undefined otherwise calculate bar