You say "if I asked you if it is safe to go out of this door, would you say yes".
If you ask "is it safe" and it is the truthteller would say "yes " and the liar "no", but the liar would lie about this and answer the above question "yes".
I remember this from about 40 years ago and I thought the first version was 2 doors and only allowed 1 question. This is all you need, if you get the answer "yes" go through that door, if "no" go through the other door.
Then came the 3 door problem. With the question I've suggested you might need to ask 2 of them.
I'm trying to remember if you can find the right door with only 1 question.