Use == instead of is.
Make check against None instead of falsey things.