[resources] Change assert to runtime check
[resources] Change assert to runtime check

This fixes the corresponding bandit warning and allows
to run the code in non debug mode while ensuring it
will fail correctly

browniebroke/deezer-python,browniebroke/deezer-python,browniebroke/deezer-python