Correcting comparison with None