Implement type lookup.