Fixing type change through the logical or idiom