This patch keeps the check for isWriteMode inside the EntitySavingHelper instead of extracting it similar to what was done in Ic6e9eb2717ac9f7ec8b7fb3d2dabaf5c3331592c. The rationale is that to properly extract it we should probably create a EntitySavingHelper interface and then have a WritingEntitySacingHelper and NonWritingEntitySavingHelper implementing it in order to properly separate those concerns. This amount of abstraction seems to not be worth it for a mere safety check that is never expected to be triggered, unless there is a bug somewhere. Co-authored-by: Bereket teshome <bereket.teshome@wikimedia.de> Bug: T277525 Change-Id: I4cb1c9e7e98c308be3e9c576da67d5f2514ae6f4