How do I interpret the j-test result in this result from 'gmm' command from 'gmm' package? How do I interpret the j-test result in this result from 'gmm' command from 'gmm' package? 
Does it mean that I am safe to use my gmm (generalized method of moments) model?
 Call:
 gmm(g = Y ~ X + X_lag1 + Y_lag1, x = Rh)


 Method:  twoStep 

 Kernel:  Quadratic Spectral

 Coefficients:
                   Estimate     Std. Error   t value      Pr(>|t|)   
 (Intercept)        3.1606e-03  4.3265e-03   7.3052e-01  4.6507e-01
 X                  2.5763e-03  2.1111e-03   1.2204e+00  2.2232e-01
 X_lag1            -2.57E-03    2.13E-03    -1.20E+00    2.28E-01
 Y_lag1             2.35E-01    4.20E-02     5.60E+00    2.17E-08

 J-Test: degrees of freedom is 0 
                 J-test               P-value            
 Test E(g)=0:    4.9684798424935e-27  *******        

 A: No. You have as many instruments in Rh as endogenous variables, i.e., exact identification. In that case, the J-statistic is by construction zero.
Here is a proof for linear GMM estimators. The notation follows Hayashi, i.e., instruments $x$, regressors $z$. Sample moment vectors and matrices are denoted by $s_{ij}$ and $S_{ij}$.
The GMM criterion function, which for the $J$-test is evaluated at the GMM estimator $\widehat{\delta}(\hat S^{-1})$ and the efficient weighting matrix $\hat W=\hat S^{-1}$ is given by
$$
J(\tilde{\delta},\widehat{W})=n(s_{xy}-S_{xz}\tilde{\delta})'\widehat{W}(s_{xy}-S_{xz}\tilde{\delta}).
$$
The linear GMM estimator is
$$
\widehat{\delta}(\widehat{W})=(S_{xz}'\widehat{W}S_{xz})^{-1}S_{xz}'\widehat{W}s_{xy}
$$
Under exact identification, $S_{xz}$ is square, so that
$$
(S_{xz}'\widehat{W}S_{xz})^{-1}=S_{xz}^{-1}\widehat{W}^{-1}S_{xz}'^{-1}
$$
and hence
\begin{eqnarray*}
s_{xy}-S_{xz}\widehat{\delta}(\widehat{W})&=&s_{xy}-\underbrace{S_{xz}S_{xz}^{-1}}_{=I}\underbrace{\widehat{W}^{-1}\underbrace{S_{xz}'^{-1}S_{xz}'}_{=I}\widehat{W}}_{=I}s_{xy}\\
&=&s_{xy}-s_{xy}=0
\end{eqnarray*}
Thus, under exact identification, the criterion function is zero for any admissible weighting matrix $\hat W$, and thus, the $J$-statistic is identically zero.
The J-test is also called test for overidentifying restrictions - i.e., if you have more instruments than you need, you can exploit that overidenfication to test the joint validity of all instruments. If you don't have that, you cannot use the test (whence gmm appropriately does not return a p-value). 
