def _check_search_kwarg_types(self, kwargs):
        '''Checks that every element of kwargs is a valid type in this tree.'''
        for key in kwargs:
            if key not in self.node_types:
                raise TypeError("Invalid search type: {}".format(key))
Checks that every element of kwargs is a valid type in this tree.