Is it possible to do if(Object)
<p>So I was wondering if it was possible to have a custom class that has a boolean value.</p>

<p>And in your main program you can do:</p>

<pre><code>if(CustomClassVariable){

}
</code></pre>

<p>Like the Boolean class?</p>
