You can remove a level of indentation here by saying

```python
if level_l is None:
    continue
```