Ghosts and demons are different from them. A ghost is a ghost when it is alive. Magic is a metaphysical concept, which is contrary to Tao and hinders practice. Monsters and robbers are external demons, while greed and lust are internal demons.
The Monkey King turned into stone, and the monkey turned into essence. Of course, he was a monster.