Created a method to compare KeyValuePairs

:palm_tree: