Add error check in DBM

This pull request adds an error message clarifying why DBM crashes with `niter=1` and `len(hidden_layers) > 1`.