It sounds like 's solution will work for what you need. However, since you mention you are new to programming I want to give you a small warning. Using the line of code mentioned above does not have any built in “sanity check”. You will want to make sure that the value that you are sending into that line is what you think it is. If you don’t, it is possible to run into situations where you expect to get a true value out of the code, but the value you sent in was true so you end up with false. You most likely won’t have any problems with a simple project, but as it gets more complex the chances of unexpected behavior increases. It is better to plan for it now so it doesn’t surprise you later.