Exclude ancestors if they either have no type or their type is not in the type list

* Add documentation to relevant get() method
* Tidy up / fix typos in documentation