trait-based discriminators for u8 and u16