Is there a preference to use ternary here / not use ternary below? I didn't want to break this logic out to another function and I didn't want to repeat the logic for both branches of an *if*.