Yes. Police officers are sworn to uphold the laws of their respective jurisdictions (state, city, etc.) AND the Constitution of the United States. I have personally taken this oath three different times. By judges for two seperate agencies that I have worked for, and once by the sheriff for a county wide task force I was assigned to.
Laws that forbid the carrying of arms... disarm only those who are neither inclined nor determined to commit crimes... Such laws make things worse for the assaulted and better for the assailants; they serve rather to encourage than to prevent homicides, for an unarmed man may be attacked with greater confidence than an armed man. Jefferson's "Commonplace Book," 1774_1776, quoting from On Crimes and Punishment, by criminologist Cesare Beccaria, 1764