Ok, I preferred an extracted method because of the repeated if but for readability it might make more sense.