Moment conditions and Bayesian nonparametrics