Wouldn't it be better the check for names which are not legal?

```
illegal = set(kwargs.keys()) - set(legal_elements) 
if len(illegal) > 0:
    raise Exception("Found illegal themeing elements: %s" % illegal)
for element_name, element_theme in kwargs.items():
    ....
```