Add a `contains` method.

I also switched the order to <K, V>, which feels more natural than <V, K>.