@Daxter is right that a ternary conditional would be appropriate here.