an empty list `[]` resolves to `False`, a list with anything in it resolves to `True` so you can do the following here instead:

```python
if data_dist['objects']:
   ....
```
which is a bit cleaner.