The first sentence is common to both parts, so it should probably be brought out of the if/else.