Best practice - How to test if a string exists in Java?
<p>I render some data based on a condition. The backing method performs a check if a string exists. But I don't know if I can be happy with the compare to <code>null</code>?</p>

<pre><code>public boolean isString(MyClass var) {
   return null != var.getMyString();
}
</code></pre>

<p>Could it be done better?</p>
