A bit neater? It keeps the logging separate.
```
if None in worker_ctx.context_data.values():
    _log.warn("Attempted to serialise a header ('{}') with the value `None`. "
              "The header will be dropped from the payload.".format(key))
headers = {self._get_header_name(key): value
           for key, value in worker_ctx.context_data.items()
           if value is not None}
```