Find and element by ID and redirect after specific time
<p>I am using the following JS to target an element with an ID of "someID" then redirect after 6 seconds. I only want this to work on a page where this element ID is present, but right now it redirects all pages it is applied to. What am I doing wrong here?</p>

<pre><code>if (!document.getElementById("someID")) {
            setTimeout(function () {
             window.location.href = "http://www.somesite.com"; 
        }, 6000); 

};
</code></pre>
