Fixed an issue where an object wasn't being properly checked for null value.