royalties: Replace assert with conditional
Do not rely on assertion to raise exceptions. Explicitely verify the condition and raise a ValueError if needed.
Ref: #2805
Edited by David Cormier
Do not rely on assertion to raise exceptions. Explicitely verify the condition and raise a ValueError if needed.
Ref: #2805