I removed the AssertionError, this was leftover from when I had an assertion in this block. I made the code clarification you suggested.