type_traits refactor