test for #1196: null Unit in instance of UnionType