Check self.theme_option before using

Fixes #493