when calculating new DP, make sure value is not null