Consider adding a comment to describe that all these "is None" clauses are just the equivalent of IF-THEN-ELSE for the rules above.