use type switch instead of reflect.TYPE
check unknown types