or just
```python
if not selected_ids:
    # stuff
```