Submission as RuntimeError while Test Runs work

Hi, I am having trouble with te behavior of my submissions. Everything runs fine within both the playground and the runtime environment but once I submit it, it will give me a Runtime error:

Line 24: AttributeError: 'NoneType' object has no attribute 'val'
Here's the link to my playground: https://leetcode.com/playground/77cjqstU

Any help would be appreciated.
Thanks and best!

Comments (0)