[typescript] Is there a way to check for both `null` and `undefined`?