make sure that 'OC_Theme' exists before checking if the method exists

fix for #9627
> `method_exists($this->theme, $method)` would be less confusing imo

I agree, fixed :-)