Added 'Either' type switch to ease some common type problems