MOB-2297 Don't update categories without changes

But this way it's more readable. There are different schools. I'd define `result` local variable and assign its value in each condition then have only one return at the end `return result` ;) @aquilax doesn't like this school :P 

It's up to you, @rogatty to go with one of those proposals. In my opinion your way is also fine :smile_cat: 

But how about add a unit test for it? :japanese_ogre: