The with clause must return a boolean.

Is it better to do

```bash
with { 
    if (exists(...) && exists(...)) {
        error(...);
    } else {
        true;
    }
};
```
?
 
Otherwise we can encapsulate this into a Pan function.