type detection