Check for bool is checking for an object instead
<p>I've created this utility method in JS:</p>

<pre><code>function IsAuthenticated(userID)
{
    var isAuthed = false;

    if (userID.length == 0)
        return false;

    // more logic
    if(SomeLogic)
       isAuthed = true;

    return isAuthed;
}
</code></pre>

<p>When I run something like this, I'm getting an object back rather than type bool:</p>

<pre><code>if(IsAuthenticated)
    //code here
</code></pre>

<p>I assume I need to cast it to a bool?</p>
