title: Do you need to check for null list or is it redundant?
body: <p>I have the following code:</p>
  <pre><code>private void checkingFunction(Object1 myOb1, Object2 object2) {
          List&lt;Person&gt; person = getPersons();
          if (person != null &amp;&amp; !person.isEmpty() &amp;&amp; object2 != null) {
              object2.setValues(person.get(0).getTheValue() != null &amp;&amp; !person.get(0).getTheValue().isEmpty());
          }
  }
  </code></pre>
  <p>I was wondering if the if check is not needed and I can simplify the above code as follows:</p>
  <pre><code>private void checkingFunction(Object1 myOb1, Object2 object2) {
          List&lt;Person&gt; person = getPersons();
          
          object2.setValues(person.get(0).getTheValue() != null &amp;&amp; !person.get(0).getTheValue().isEmpty());     
  }
  </code></pre>
  <p>Is it correct to make such a change or is it better to use the control if?</p>