Protect against users calling Derive with a wrong ValueDecl.

Use NDEBUG only of to do it only in debug mode.