The function of boiling the sodium extract with conc. HNO3 before testing the halogen is:
If an organic compound contains nitrogen or sulphur, these elements form NaCN and sodium sulphide with sodium metal. So these may interfere in the extraction of Na metal. In order to remove sodium cyanide and sodium sulphide, sodium fusion extract are boiled with concentrated HNO3.