type-insensitive type parsing