We already have:
function isNotUndefined(obj:any): obj is string | number | boolean | MyCustomType | null | MyOtherCustomType {
return typeof obj !== "undefined";
}
Now we just need:
function isNotUndefined(obj:any): obj is not undefined { // or isnot
return typeof obj !== "undefined";
}