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