Model Checking with Residuals for g-estimation of Optimal Dynamic Treatment Regimes