Simplify if helper and view
Merge pull request #10002 from mmun/simplify-if-helper

Simplify if helper and view