title: Should conditions test for positive or negative results?
body: <p>Sorry if the title is rather ambiguous, I was not sure how to word it.</p>
  
  <p>Is it better to phrase a condition such that the outcome you don't want enters the if statement then you exit the function or should I test for the outcome I do want and follow the statement with my code.</p>
  
  <p>Maybe some examples would help:</p>
  
  <p>What I mean by testing for negative result:</p>
  
  <pre><code>if(myObject == null) {
      return;
  }
  
  //do whatever with myObject
  </code></pre>
  
  <p>What I mean by testing for positive result:</p>
  
  <pre><code>if(myObject != null) {
      //do whatever with myObject
  }
  </code></pre>
  
  <p>Sorry, if someone can word it better than me please do.</p>