Null check for Ids in a process

A Score Level 1

I have a condition where i wanted to do null check if either of the IDs are null it shoudn't write to database. I am using this code in task output.

remove(
  wherecontains(
    or(a!isNullOrEmpty(pv!primaryId)),
    a!isNullOrEmpty(pv!selected)
  
  rule!NV_constructCDT(
    formId: pv!form.FormId,
    primaryId: pv!primaryId,
    secIds: pv!selected,
    
  ),
  
))

Do you have any ideas to optimize this implementation? Thank you

  Discussion posts and replies are publicly visible