Typescript and non string Environment Variable parsing

Leaving this here as just a simple get an env variable and 'cast' to boolean is a PITA. But this is what I ended up with...
const skipTestSetting = process.env.BOT_SKIP_KNOWN_FAILED_TESTS;
export const shouldSkip = (t: TestObj): boolean => {
const noSkip = skipTestSetting === 'true'
? true : typeof skipTestSetting === 'string'
? !!+skipTestSetting
: !!skipTestSetting;