Effects of magnetic field and rare‐earth ions on properties of polyaniline nanoparticles