type detect