Only set the dictionary if a predicate is returned