title: thymeleaf Cannot aggregate on iterable containing nulls
body: <p>I am trying to use <code>thymeleaf aggregate</code> utility to find sum of salary from list as below</p>
  
  <pre><code>th:text="${#aggregates.sum(myList.![salary])}"
  </code></pre>
  
  <p>here <code>myList</code> is list of <code>MyObjct</code> as below</p>
  
  <pre><code>List&lt;MyObject&gt; myList;
  
  public class MyObject{
  
  private String name;
  private double salary;
  //getter setter
  }
  </code></pre>
  
  <p>Everything works fine until salary is <code>null</code> on each item of list. On that case i am getting error
  <code>java.lang.IllegalArgumentException: Cannot aggregate on iterable containing nulls</code></p>
  
  <p>How can i check if all items of list are <code>null</code> to prevent this error.</p>