if it wasn't/weren't for...

if it weren't for (someone or something)

If someone or something hadn't helped, intervened, or affected the situation in some way. The phrase is always followed by an explanation of how things would have turned out different without someone or something. If it weren't for those quick-thinking bystanders, I wouldn't be alive today. If it weren't for my student loans, I would be a millionaire by now.
See also: if
Farlex Dictionary of Idioms.

if it wasn’t/weren’t for...

used to say that somebody/something stopped somebody/something from happening: If it weren’t for you, I wouldn’t even be here today.
See also: if
Farlex Partner Idioms Dictionary
See also:
  • if it hadn't been for (someone or something)
  • if it weren't for (someone or something)
  • if not for (someone or something)
  • were it not for (someone or something)
  • (as) sure as eggs (is eggs)
  • great minds
  • great minds think alike
  • Heinz 57
  • Heinz 57 (variety)
  • Heinz 57 variety