Support features that requires at least one elemenmt in the TypeList

Add BaseTypeList and BaseHeadedTypeList, and specialize TypeList depending on
whether it has at least one element.