fixed issue where if rules are null, they cannot be iterated through

I don't know how common this can be, but I came across the issue with a chrome plugin that changes dom.