'Map a function from str -> bool element-wise over ``self``.
``f`` will be applied exactly once to each non-missing unique value in
``self``. Missing values will always return False.'

def map_predicate(self, f):

    if (self.missing_value is None):
        def f_to_use(x):
            return (False if (x is None) else f(x))
    else:
        f_to_use = f
    results = np.vectorize(f_to_use, otypes=[bool_dtype])(self.categories)
    results[self.reverse_categories[self.missing_value]] = False
    return results[self.as_int_array()]
