title: How to distinguish between Pointer and TObject entries in a TStringList?
body: <p>We can add strings along with some associated objects to a TStringList:</p>
  
  <pre><code>list: TStringList;
  obj: MyObject;
  
  obj := MyObject.Create();
  list.AddObject("real object", obj);
  </code></pre>
  
  <p>In addition it can be very handy to simply connect a string with a Pointer, i.e., an integer value, like this:</p>
  
  <pre><code>list.AddObject("just an index", Pointer(7));
  </code></pre>
  
  <p>If I later access to an object in this list how to know if it is a MyObject or simply a Pointer? I want something like this:</p>
  
  <pre><code>for i := 0 to list.Count-1 do
    if list.Objects[i] is MyObject then
    begin
      // ...
      // Do something with list.Objects[i]
      // ...
    end;
  </code></pre>
  
  <p>but this obviously leads to access violation if <strong>list.Objects[i]</strong> is just a Pointer. 
  Thanks in advance!</p>