Error thrown

Call to a member function set_background_type() on null