Fix inline if statements to make conditions more readable