Instead do:
```python
if self.parameter:
    raise ...
return self
```