Check if key in freq is also in z