def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def test_supertype(self):
        self.assert_(isinstance(None, NullType))
        self.assert_(isinstance(Optional('a'), NullType))
        self.assert_(isinstance(NotPassed, NotPassedType))
        self.assert_(isinstance(NotPassed, NullType))