replaces (non working) nonzero with empty

`__nonzero__` didn't work, now works using a simple `empty` method; I've changed the places where the `bool` comparison was used.
Correction: it's Python2.