I used to have them bad. I don't remember having any in recent years. When I was young, I learned how to wake myself up if I am in a nightmare. From then on, if I was in a dream that looked like it was about to get scary, I would just wake myself up, and usually forget about the whole thing in seconds.

Sometimes I do the opposite. If I know I am in a dream, and I enjoy it, I will purposely keep myself asleep. If I hear my phone buzzing, I won't think about it so I stay asleep and in the dream.