Je schrijft het als twee losse woordjes: 'dan wel'. 'Dan wel' (als combinatie) heeft twee betekenissen: 'of' en 'in dat geval'.