Check if key in freq is also in z
Write distances and frequencies with Z-score of None if no d in z