def collection_exists(collection_name, **kwargs):
 if (not isinstance(collection_name, six.string_types)):
  raise ValueError('Collection name must be a string')
 return (collection_name in collection_list(**kwargs))

def collection_exists ( collection_name , ** kwargs ) : if ( not isinstance ( collection_name , six . string_types ) ) : raise ValueError ( 'Collection name must be a string' ) return ( collection_name in collection_list ( ** kwargs ) )
check if a collection exists additional parameters may be passed .