Why not check if (oldValue==newValue) and then do the same thing as above?