a few type-related helper methods