Thermal stability of chemically synthesized polyaniline