Use "is" to compare with None as per PEP 8

Use "is" to compare with None as per PEP 8