title: How to check null on StringBuilder?
body: <p>I want to check for null or empty specifically in my code. Does empty and null are same for <code>StringBuilder</code> in Java?</p>
  
  <p>For example:</p>
  
  <pre><code>StringBuilder state = new StringBuilder();
  StringBuilder err= new StringBuilder(); 
  success = executeCommand(cmd, state, err); 
  
  /* here executeCommand() returns empty or null in state, I cant  make changes in  &lt;br/&gt; executeCommand() so can I check it in my code somehow for state, if its null or empty? */&lt;br/&gt;
  
  if (state == null) { //do blabla1 }
  if (state.tostring().equals("")) { //do blabla2 }
  </code></pre>
  
  <p>Does above code make sense or how should I change it?</p>