(b) Unless specifically prohibited by any other provision of this code or the laws of the United States, nothing in this section shall prohibit the authorized manufacture, transportation, distribution, use or possession of any explosive, destructive device or incendiary device by a member of the armed forces or law-enforcement officers whenever such persons are acting lawfully and in the line of duty; nor shall it prohibit the manufacture, transportation, distribution, use or possession of any explosive material, destructive device or incendiary device to be used solely for lawful scientific research or lawful educational purposes. Any person engaged in otherwise lawful blasting activities failing to obtain a permit or in possession of an expired permit issued by the office of the state fire marshal shall not be construed to be in violation of the article.