Factor common code out of if