Add end to if expression