Use switches when doing multiple typeofs.