Getting run time error - insertion sort in LL

Why I’m getting run time error? I cannot figure out. what’s wrong with the code. Please help me to deal with this problem.

Hey Vaari!

Please check the comments in the following code:

Ok I go through it once and let you know whether it’s approach clear to me or not

Sure, let me know if you have any further queries.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.