I used death.toggle at the start of my save, and I set it to false. I tested it, and I believe the cheat isn't working... The other day I had my sim eat the cowplant cake twice...She died! (Thankfull...
Honestly you're probably better off investing in a mod. The very Base or Base + Cheats (I don't really know what adds what to be honest) version of MCCC allows you to flag sims not to die.