Angular Typescript Check If Object Is Undefined Slope