I don't even think that matters. It's not like it would be hard for home invader types to buy police uniforms, or facsimiles, and use police like tactics when breaking in.
Why should the burden be on the homeowner to hold his fire, then find out he guessed wrong? I say if the cops bust in, you should be able to ventilate them with impunity unless they can come up with some foolproof way for the breakin-ees to ascertain their ID BEFORE they enter.
The law is like 40 years behind the times on this. Caveat shootor.