Lassaigne's extract is boiled with dil HNO3 before testing for halogens because:
Dilute HNO3 is added to the sodium fusion extract {Lassaigne's extract} for the removal of ions particularly Cyanides, Carbonates and sulphides these ions also give ppt with silver nitrate (AgNO3) solution.
Hence option B is correct.