Ops! Yeah, I would not do that. But, what about just an iPhone or Android ... not plugged in?
Perfectly safe.
Unless the battery explodes. In 2009 in China, there was a case where an exploding cell phone battery killed a guy:
The shop worker from Guangzhou, China, died moments after he put a new battery in his phone, it has been claimed.It was believed that he may have just finished charging the battery and had put the phone in his breast pocket when it exploded.
An employee at the shop told local media that she heard a loud bang and saw her colleague lying on the floor of the shop in a pool of blood. The employee said the victim had recently changed the battery in his mobile phone.