remove None types when unioned
The downstream of If may take neither of the two branches.
more concise union types