check if an objects is defined in typescript code example
Example: how to check if object exists in javascript
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}