In this case the home owner was lucky. But seriously, you should not fire blind, fire through a door.
If you fire through a door, you are much more likely to injure family, friends, or first responders than criminals.
This one was justified. Maybe he had a door camera? But as a rule, do not fire until you know exactly what you are shooting.