helper macro to create unit type