https://tutorial.eyehunts.com/js/javascript-check-if-undefined-example-code/
JavaScript check if undefined | Example code