Typescript String Or Undefined Line