detect and filter out invalid frequency entries