title: How to tell if a Delphi variant is an empty string?
body: <p>Variants are always fun, eh?</p>
  
  <p>I am working on a legacy application that was last in D2007 to migrate it to Delphi XE.</p>
  
  <p>Variants have changed quite a bit in the interim.</p>
  
  <p>This line of code: </p>
  
  <pre><code>if (VarType(Value) = varString) and (Value = '') then 
    Exit;
  </code></pre>
  
  <p>returned True and exited in D2007, but doesn't in Delphi XE.</p>
  
  <p>I have changed it to this:</p>
  
  <pre><code>if VarIsStr(Value) and (VarToStr(Value) = '') then
      Exit;
  </code></pre>
  
  <p>I'm not convinced this is the "best" way to go.  The Variants unit doesn't have a specific call to do this, and I certainly recall this being an issue for folks in the past.  However, a search revealed no library function or any other accepted way.</p>
  
  <p>Is there a "correct" or better way?</p>