Instant KO to Sleeping targets skill

I would like to make a skill called Serene Dream that instantly KO's any target that is Asleep. Could anybody please help me out?
Try if b.isStateAffected(x) ?  b.addState(1);damage formula


Where x is the id of the sleep state.
Cool! Thanks for the reply. Do I put this into Damage Formula space or the Notes? Also does this require any plugins? 
Damage formula

Original thread: https://forums.rpgmakerweb.com/threads/instant-ko-to-sleeping-targets-skill.60491/