> It looks like it's enough to merge conditions to avoid such repetition.
You're right, it looks a bit awkward. How about the new version?
Regards,
Fabian Maurer