had it not been for
Had it not been for means you're only getting away with something because of one thing. If that thing wasn't there, you'd be caught.
Had it not been for the teacher turning around, I'd have been caught cheating on the quiz.
Had it not been for my brother covering for me, I'd be grounded for a month.
Had it not been for the traffic light changing, I would've been run over by a truck.
xs