This if-else can be eliminated by taking advantage of the identity transform:

```python
transform = transform or (lambda x: x)
items = [transform(i) if i != '' else None for i in items]
```

You can even give it a local name like ```identity = lambda x: x; transform = transform or identity```.