had it not been for
Had it not been for means you're only not in total disaster because of one small thing. Everything else is trash.
Had it not been for my phone battery not dying, I'd have been stuck in the dark all night.
Had it not been for my neighbor calling the cops, I'd have been arrested for stealing the pizza.
Had it not been for my cat knocking over the lamp, I'd have fallen asleep on the floor.
xs