title: String equality with null handling
body: <p>I will often use this code to compare a string: </p>
  
  <pre><code>if(!string.IsNullOrEmpty(str1) &amp;&amp; str1.Equals(str2)){
      //they are equal, do my thing
  }
  </code></pre>
  
  <p>This handles the null case first etc. </p>
  
  <p>Is there a cleaner way to do string comparison, perhaps with a single method call that will handle possible null values? I simply want to know that the strings are not equal if the testing value is null. </p>
  
  <p>(I'm having dejavu that I may have asked this before, I apologize if so)</p>
  
  <hr>
  
  <p>Update: In my case, the str2 is a known good string to compare to, so I don't need to check it for null. str1 is the "unknown" string which may be null, so I want to say "str1 does not equal str2" in the cases where str1 <em>is</em> null...</p>