Fixed wrong exception in ObjectMixin
Merge pull request #1231 from enumag/object-bug

Fixed wrong exception in ObjectMixin