Consider i.i.d. pairs $(\theta_i, X_i), i \geq 1$, where $\theta_1$ has an unknown prior distribution $\omega$ and given $\theta_1, X_1$ has distribution $P_{\theta_1}$. This setup arises naturally in the empirical Bayes problems. We put a probability (a hyperprior) on the space of all possible $\omega$ and consider the posterior mean $\hat{\omega}$ of $\omega$. We show that, under reasonable conditions, $P_{\hat{\omega}} = \int P_\theta d\hat{\omega}$ is consistent in $L_1$. Under a identifiability assumption, this result implies that $\hat{\omega}$ is consistent in probability. As another application of the $L_1$ consistency, we consider a general empirical Bayes problem with compact state space. We prove that the Bayes empirical Bayes rules are asymptotically optimal.