Another advantage of a shotgun over a rifle or pistol is that the "cloud" of pellets is more forgiving of poor aiming which can be a factor at night. Also, the area of damage is greater than a single solid projectile.
Think about that - one .38 cal slug (0.355-.358") vs. 12-15 pellets that are .33" (OO Buck) diameter.
Which will give you better "coverage"?
What’s the biggest room in your house? Take your shotgun and preferred defensive load to the range and pattern it at the longest distance you might have to shoot inside the house. I think you’ll find the pattern is about as wide as the bore.