While I have heard all manner of horror stories through the years of officers being hesitant to take out firearms because of possible beefs, policy violations, or having to write a memo for doing so, our judicial system has given law enforcement officers quite a bit of latitude when it comes to their doing so. Time and again, courts have ruled that "while police are not entitled to point their guns at citizens when there is no hint of danger, they are allowed to do so when there is a reason to feel danger."
That reason has to be articulable and objectively reasonable. Generally, this means that there has to be a valid sense of danger.
That sense of danger can be based upon the nature of the investigation (e.g., a shots fired call); the sensibilities of the individual detained (PAL known to be armed), or the number and disposition of people being detained (like, say a bunch of bikers who've just stabbed and shot each other in a Laughlin casino).
So long as you can articulate your concerns, you're apt to be covered.
It doesn't always go without a hitch. Innocent people can become victims of circumstance. Certainly, my sympathies go out to one poor couple here in Los Angeles County who were detained naked at gunpoint while investigators searched their home for suspects and evidence related to an identity theft case. Unfortunately, the only thing the two were guilty of was moving into a dwelling that had previously been occupied by those actually culpable for the crime, one of which was known to own a registered handgun (ergo, the presence of police firearms). Sometimes, things just don't play out as nicely as we would hope. At least the cops didn't storm into the wrong address.