if (userIds) {
    const userFindCondition = userIds instanceof Array
      ? { userId: { $in: userIds }}
      : { userId: userIds };