title: MULE MEL Test For Null
body: <p>I have a situation where an arraylist is being populated with one null value (I have no control over that).  I need to check if the entry in the list is null and I cannot seem to make that work.  How do I check the entry found in the list to see if it has value null?  I thought the choice below was right but when I run a test I fall in the not null path.  I know (from logging) that the value is showing null in the log.</p>
  
  <pre><code>&lt;set-variable variableName="workOrderMap" value="#[deinstallMsg.workOrderMap[parentWorkOrderGroupId].nextWorkOrderTypes]" /&gt;
  
  &lt;foreach doc:name="For Each Child Work Order" collection="#[workOrderMap]" rootMessageVariableName="msg"&gt;
      &lt;set-variable variableName="childWorkOrderType" value="#[payload]" /&gt;
      &lt;choice doc:name="check for null"&gt;
          &lt;when expression="#[childWorkOrderType != null]"&gt;
              &lt;logger message="EDFEDFEDF found NOT null workordertype" level="INFO" doc:name="null check"/&gt;
          &lt;/when&gt;
          &lt;otherwise&gt;
              &lt;logger message="EDFEDFEDF workordertype: #[childWorkOrderType] IS NULL" level="INFO" doc:name="null check"/&gt;
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  &lt;/foreach&gt;
  </code></pre>