I looked at `__nonzero__` for a while and it got scary. It's clearly used for other internal operations that I didn't understand. And `__bool__` might have been an option but comparing:
```
if self.database:
```
...to...:
```
if self.database.has_data():
```
the latter one is much more explicit and self-explanatory.