If you are wanting to protect your DC circuitry from this condition you describe, the answer is simple, use a 4 diode bridge. If the polarity is one way, two diodes conduct, if the polarity is the other way the other two diodes conduct. The end result is that with a bridge you can feed DC of either polarity to it and DC of a known polarity will result. Not sure if this will help you in your situation, but it was what came to mind when I read your post.
BTW, new member here, 1st post.
Regards,
Bob