There is, but waiting for the commander to shout "he's got a gun!" is one of those situations where you would be dead before you heard it. So when something unexpected happens everybody has to make a judgement call, and it only takes one panicky or trigger happy policeman to make a tragedy.
There is also a mismatch between tactics designed to deal with a gang controlled house full of methed out hoods being used on a quiet suburban family that was maliciously targeted. In the former there is a reasonable argument that if you give them warning they will attempt to ambush your officers, so the best course of action is to disable them all simultaneously to reduce loss of life. Using it in other situations however leads to cases where infants have their lungs burned out by flashbangs. This is why I suggested maybe asking the neighbors first, especially in areas where criminal activity is unusual.