Slightly simplified type_traits.