Or an easier solution (although not fool proof) is to use a 3 pin header for the batter supply. With, say, Gnd in the middle, +ve at one end, and unconnected at the other end. Then if you plug it n the wrong way then 'nothing' happens. Or use polarized header pins/sockets.
Obviously if the header is left plugged in and you try to connect your 9v battery into the clip the wrong way around then it doesn't help. But better than nothing.