Adds a nonzero method to avoid running unnecessary len

Checking truthiness of Database would run the __len__ command.  I don't think this was intended.