Simplify the get_type() function.
Submitted by: bde Discussed with: bde, jhb and pfg MFC after: 2 weeks.