checK_grad docstring into comment and assert_