fix comparison between undefined and null after upgrade should