Added docs for type function