A few cards like Good Samaritan and Twisting Back Alleys give you the option to play the top card of a deck in order to do something. These cards require that the top card of the deck is actually played. If something is preventing the deck from playing cards, it won't work. If some other effect causes the top card to not be played, it won't work.
A common example involves Spite: Agent of Gloom, Good Samaritan, and Lab Raid. At the start of the Environment turn, Good Samaritan allows the players to choose to play the top card of the Villain deck. Suppose the top card of the deck is Lab Raid. According to Spite: Agent of Gloom's card, whenever a Lab Raid would be played, instead it is discarded and Spite deals each hero target 2 melee damage. So the top card was not actually played, and the Good Samaritan does not go under the Safe House.
Another example involves Twisting Back Alleys. If you've played Take Down, Mistbound, or have otherwise prevented the villain or environment deck from playing cards, then you will not be able to destroy Twisting Back Alleys using its end of turn condition. It can also interact with Spite: Agent of Gloom and Lab Raid in a similar way.