Typescript Array Object Is Possibly Undefined Typescript Enum