You true, maybe it is a totally useless caution from the pranoid novice scripter i am.
I initially mentionned the first line because if you had previously tested your function and that those variables were existing in your environnement (for any reasons), if those variables were still holding some nested values from previous test, it could have been an additionnal potential source of unexpected results so i just forced them to empty to make sure your test would run from cleaned variables.
But now that you've fixed your code and checked it is working as expected also without it, you can of course remove the line.