Bayesian assessment of goodness of fit against nonparametric alternatives