Fix None is not None condition