Thermal stability of polyaniline