def get_ref(self):
        """ Returns a `DBRef` for this object or ``None``.
        """
        _id = self.id
        if _id is None:
            return None
        else:
            return DBRef(self.collection, _id)