In this paper we study a generalized coupon collector problem, which consists of determining the distribution and the moments of the time needed to collect a given number of distinct coupons that are drawn from a set of coupons with an arbitrary probability distribution. We suppose that a special coupon called the null coupon can be drawn but never belongs to any collection. In this context, we obtain expressions for the distribution and the moments of this time. We also prove that the almost-uniform distribution, for which all the nonnull coupons have the same drawing probability, is the distribution which minimizes the expected time to obtain a fixed subset of distinct coupons. This optimization result is extended to the complementary distribution of the time needed to obtain the full collection, proving by the way this well-known conjecture. Finally, we propose a new conjecture which expresses the fact that the almost-uniform distribution should minimize the complementary distribution of the time needed to obtain any fixed number of distinct coupons.