shouldn't this be `unicode(theme.name) if theme.name else u''`?