split this instruction in two, 
```python
s = p.value if p else ''
.. str(s)
```
or something similar, it will be easier to read than this multi-line instruction