fix order of comparison between string and None