More efficient contains method for proxy dict