Best way to test something is a document, in AppleScript?

Somehow it seemed like there might be more types than groups, smart groups, and feed. For example, are tags really indistinguishable from groups at the AppleScript level?

Initially, my question was just so that I could further expand the icon-copying script from another posting, but that led to the question in my mind of how to test more directly that something is a document.

Anyway, thanks everyone!