You should always do "__ is None", not "__ == None".