If you say it's a good thing
, or in British English it's a good job
something is the case
, you mean
that it is fortunate
It's a good thing you aren't married.
It's a good job it happened here rather than on the open road.
COBUILD Advanced English Dictionary. Copyright © HarperCollins Publishers