title: When is correct to use the is operator in delphi?
body: <p>How can I test that a not nil TObject does not hold an object of a specific class in the case below?</p>
  
  <pre><code>procedure TForm7.testme;
  var
      mystring: string;
      obj: TObject;
  begin
      mystring := 'asd';
      obj := TObject(mystring);
  
      if assigned(obj) then
          if obj is TestClass then // --&gt; this is failing
          // ...
  end;
  </code></pre>