code: public function canRender($nameOrModel)
      {
          if (!$nameOrModel instanceof View\ViewModel) {
              return false;
          }
  
          try {
              $this->resolver->resolve($nameOrModel);
          } catch (\Twig_Error_Loader $e) {
              return false;
          }
          return true;
      }
docs: {@inheritDoc}