Resolving issue #1 - Making sure to check object is valid before reading property.