Fix list() warning

Allow for list() to not provide a warning if $data doesn't exist, for example in an empty comment

```
# Comment here
# Empty comment below
# 
```