Are you sure we don't need the `gettype` in `($this->app['session']) == 'object'` ?