It is easy to make your code redundant when returning or setting a boolean value, so you must be cautious. Because a boolean can exist in one of two states, "true" or "false", there are many occasions where you only need to write code that checks when the boolean is either true or false, not both. This is because if the boolean isn't true, it must be false, and vice versa.