Refactor if/unless helpers

Refactor if/unless helpers