How to detect is argument jQuery object
<p>I want to create function that can be used either with Id or by passing jQuery object.</p>

<pre><code>var $myVar = $('#myId');

myFunc($myVar);
myFunc('myId');

function myFunc(value)
{
    // check if value is jQuery or string
}
</code></pre>

<p>How can I detect what kind of argument was passed to the function?</p>

<p><strong>Note!</strong> <a href="http://stackoverflow.com/questions/6283255/detect-if-an-argument-is-a-jquery-selector">This</a> question is not same. I don't want to pass selector string like <code>#id.myClass</code>. I want to pass the jQuery object like in the example.</p>
