Fix bug DNN-3767: check whether old parent id equals new parent id include NUll condition.