title: Mule Dataweave null check and array empty check of JSON payloads
body: <p>Need to check null and empty array in Dataweave using filter or any other logic. </p>
  
  <p>First check the parentId is null, we need to skip the particular JSON. If parentId is not null need to check the mobileContacts or emailContacts 
  have the array of values. If mobileContacts and emailContacts have empty List we need skip the particular JSON values. If  any one have the value we need to process the records.</p>
  
  <p>Input JSON:</p>
  
  <pre><code>{
    "name": "XYZ",
    "age": 23, 
    "results": [
      {
        "parentId": "12345",      
        "notes": "proceed",
        "mobileContacts": [
          {
            "relationId": "12345",
            "callId": "3456213"
          },
          {
            "relationId": "12345",
            "callId": "12345"
          }
        ],
        "emailContacts": [ ],
        "initial": true
      },
       {
        "parentId": "435638",      
        "notes": "proceed",
        "mobileContacts": [ ],
        "emailContacts": [ ],
        "initial": true
      },
       {
        "parentId": null,      
        "notes": "proceed",
        "mobileContacts": [
          {
            "relationId": "12345",
            "callId": "3456213"
          },
          {
            "relationId": "12345",
            "callId": "12345"
          }
        ],
        "emailContacts": [ ],
        "initial": true
      }
    ]
  }
  </code></pre>
  
  <p>Need below Output:</p>
  
  <pre><code>{
    "name": "XYZ",
    "age": 23, 
    "results": [
      {
        "parentId": "12345",      
        "notes": "proceed",
        "mobileContacts": [
          {
            "relationId": "12345",
            "callId": "3456213"
          },
          {
            "relationId": null,
            "callId": null
          }
        ],     
        "initial": true
      }
    ]
  }
  </code></pre>