Added additional check to see if the cache_object value is defined