Use of `selected()` function instead of ternary condition to insert ' selected="selected"' or empty string.