Add support for dict values to min/max

Refactor search to be a little cleaner, use a dict of predicate_types
to determine logic instead of if statements.