Can you rewrite this line to be a bit more idiomatic? Something like 

```
if type(events) is not list:
```