[Emergency] Uncaught Error: Call to a member function exists() on null

GET /away/go/?c=9&i=Image320x320

Line 28 in /var/www/app/src/Controllers/AdController.php

Source

19 
20     private static /** @noinspection PhpUnusedPrivateFieldInspection */
21         $allowed_actions = [
22         'go'
23     ];
24 
25     public function go(HTTPRequest $request)
26     {
27         $adCampaign = AdCampaign::get_by_id($request->getVar('c'));
28         if ($adCampaign->exists()) {
29             if ($adCampaign->GetBanner($request->getVar('i')) != '') {
30                 $hitColumn = str_replace('Image', 'Hit', $request->getVar('i'));
31                 /** @noinspection SqlResolve */
32                 DB::query(
33                     sprintf(
34                         "UPDATE %s SET %s=%s+1 WHERE `ID`=%d",

Trace