def checked_emit(self, value: Any) -> asyncio.Future:
        """ Casting and checking in one call """

        if not isinstance(self._subject, Subscriber):
            raise TypeError('Topic %r has to be a subscriber' % self._path)

        value = self.cast(value)
        self.check(value)
        return self._subject.emit(value, who=self)
Casting and checking in one call