fix compare with None bugs