Hi,
If there is a coding error you should get None, it means that there is not gradients and model is not being properly backpropagating. Another issue could be vanishing gradients, in that case gradients would exist but gradually decrase back to the input of the network.
Let me know if you find some of them