adding only non-falsy itemIds to keyIds array