Fix type analysis in conditional expressions