This is where situational awareness is key. If I wake up and lights and sirens and helicopters are surrounding my house, I'm going to place myself within arms reach of my HD gun, in case there is a BG already in my house. I'm not going to touch the gun until I know someone is in my house and that person has not announced themselves as a LEO.
It's scary, but you have to keep your SA up. Any of us that have firearms for SD/HD can make mistakes that will get us shot. Be smart. Realize that when the LEO's show up, all they see is a guy with a gun. They don't know who you are. We don't have signs around our necks that read "Good Guy" or "Bad Guy" so LEO's are going to assume that anyone and everyone is the BG.
Long before the internet and caller ID hackers, cops have responded to the wrong address and such.
As soon as LEO's are on scene, your role as the armed citizen is over. Disarm yourself quickly and in a completely non threatening manner and always follow their instructions exactly. When everyone has a gun drawn is not the time to try and figure out who the BG is. That can easily be taken care of later.
A hit with a .45 ACP beats a hit with a .22 LR everytime. A hit with a .22 LR beats a miss with a .50 BMG everytime.