Added a convenience property to Document for keeping track of document types (something that is often required when building views)