#2: None check

I hope it solves the problem.