checking for None instead of not `var`