Around here the cops let you know who is knocking; the two times a LEO has come to my door asking once about some vehicle breaks ins in the area and the second time asking questions about a neighbor who turned out was a wanted sex offender...anyways both times it was the preverbal cop knock followed by "XXXX Police". They identified themselves; I did not come to the door armed. I actually made it a point to make sure both of my hands were visible as I opened the door and to make sure I ditched my pocket knife before I went to the door.
Something LEO's need to understand about lawful gun owners which for their purposes could be anyone in a home they are entering. First If you cannot see me in my home through a window I cannot see you.
If someone comes knocking on my door past 10 or before 8 I am on Alert.
I will probably arm myself before going to check on who it could be. I would not do anything as foolish as "waving" the gun about like the poor guy who ended up dead in this case but more than likely I would have my P229 in a SOTB holster.