See the UnionUtils from the DTO package. Once this lands, we should refactor the DTO mappers to leverage the type guards.