Consistent estimation of a mixing distribution