This question gets pretty interesting starting from the second answer.

http://stackoverflow.com/questions/16801322/how-can-i-check-that-a-list-has-one-and-only-one-true-value