I personally like:
`return str(self.type) if not self.identifier else '{self.type}-{self.identifier}'.format(self=self)`
but it's a matter of taste :)