Default not returned bugfix

Catching a broad exception to ensure the return of the default, added te...sts, fixed a bug where obj.contains(obj) returned false, added test case.
Just catching everything is not a good idea... there might be a ``NameError`` somewhere, that would remain undetected. Please only catch specific, relevant exceptions.