Taking in account the case when the source variable is not defined

And an UnboundLocalError exception is raised.