You could use a ternary instead here.