This can be simplified by 
```python
if not rules:
```