Correct union type comparsion et al