Cuin nach robh Tòmas sàbhailte?

The Gaelic sentence more literally translates as “When wasn’t Thomas safe?”

To be more faithful to the English sentence, you would say “Cuin a bha Tòmas ann an cunnart?”