Talk to a lawyer, but realize that a judge can do pretty much whatever they want. You can challenge it but in the meantime, the kids are gone.
It should not be legal to take away kids because of harmless reptile pets. BPs are no more dangerous than geckos or hamsters. But in this day and age, stupid stuff happens.
Don't flaunt it, don't inflame the issue and make it a "non-issue" when talking to the ex or a lawyer other than yours.