fix #504 add support for TypeExist 

and added convenience methods for IndexExists() and TypeExists()