Truthfully we don't have much of a standard for when we use the ternary operator. It usually comes down to preference of whoever is reviewing. I personally would use it in this case because it's a fairly simple if check and the line itself doesn't stretch out very far. Plus the code itself is fairly self explanatory.

Let whoever is reviewing this decide.