Making priority take optional comparator