Add protection for empty objects

* Do not iterate over empty data.
* Add log warning.