It’s called reverse thinking.
Source: To Come Up with a Good Idea, Start by Imagining the Worst Idea Possible