Add conditional to return of newly set value equals the one already set.