If helper with conditionals