This paper is concerned with inference about a function g that is identified by a conditional moment restriction involving instrumental variables. The function is nonparametric. It satisfies mild regularity conditions but is otherwise unknown. The paper presents test of the hypothesis that g is the mean of a random variable Y conditional on a covariate X . The need to test this hypothesis arises frequently in economics. The test does not require nonparametric instrumental-variables (IV) estimation of g and is not subject to the ill-posed inverse problem that nonparametric IV estimation entails. The test is consistent whenever g differs from the conditional mean function of Y on a set of non-zero probability. Moreover, the power of the test is arbitrarily close to 1 uniformly over a set of functions g whose distance from the conditional mean function is O(n-1/2), where is the sample size.