Rewriting of some checks using Lenses