I think this needs to be 
```python
if 'schedule' not in config or not config['schedule']:
```