tools: use is None
consistently in Python
#36606
Merged
is None
consistently in Python
#36606