add better default switch case for type