The short answer is yes. The only issue the Court is interested in is what is in the best interests of your child(ren). According to the law, there is no preference toward the sex of the parent of the child(ren) when the court is awarding custody of the child(ren) to either parent. The court’s only concern is what is best for he child(ren). This is a very complex issue. Notwithstanding the law, many judges still believe the child(ren) belongs with the mother. If you are a male, and have such a judge, and truly believe that you are the better parent, the entire case must be crafted so as to ensure that you have a valid appeal if the judge is biased toward the mother, and against you because you are a male.
Best interests of the child(ren) is not a general term. There are a series of factors that the Court must consider in determining what is in the best interests of the child(ren). See an experienced attorney who has tried these issues.

Warning! No matter how bad things are at home, never speak despairingly of your spouse to or in front of your child(ren). This is harmful to the child(ren). They did not ask to be born. You are their mother or father. It is your obligation to nurture and love your child(ren). Do not use them as pawns to get back at your spouse. Do not use them as sounding boards, or vent to them.
Additionally, unless you truly believe that your spouse is a real danger to your child(ren), do not keep the child(ren) from your spouse. If you believe that your spouse is a danger to the child(ren), think of them first. Even if you are a Police Officer, contact your local authorities, the Police, CPS, or whatever your local jurisdiction has to ensure the safety of your child(ren). If you or your spouse is licensed to carry a weapon, keep the weapon out of the house during these difficult times. If you are so afraid of your spouse that you believe it is necessary to have your weapon in your home during such times, things are already out of hand. Think of the child(ren)’s safety first, then yours. Contact the authorities, your delegate, your attorney, POPPA, or whomever you trust. Do not go through this alone. Simply put, your child(ren) are more important than your job. What is the big deal about arranging with the ICO, or another supervisor to ensure that it is documented that you do not bring a weapon home? Or, even if your guns are taken during the duration of this matter, who cares, when compared to the health and safety of your child(ren)?