Ákos Kőműves Yes yes but, itemsAsSet is a Set and has not filter as method. But we can write this:
let itemsAsList = Array.from(itemsAsSet).filter((v) => v !== undefined && v !== null ));
Thank you for the feedback, I appreciate it and I'll integrate the correction