MOB-2297 Don't update categories without changes

could you use `elseIf` so that second condition doesn't need to be checked if first one turns `true`?