Is it better to check existence of an element before removing it?
<p>My page has an alert box that shows when there are no entries to show. When a new entry is added via AJAX I remove this element with a simple:</p>

<pre><code>$('#empty-alert').remove();
</code></pre>

<p>I was thinking: When I add following entries I simply call this method again regardless the element exists or not. Is it better to check the existence first and if it exists, call <code>remove()</code>? Like:</p>

<pre><code>if($('#empty-alert').length){
    $('#empty-alert').remove();
}
</code></pre>

<p>Or is this just extra work when the element does exist and the first idea is already checking existence and removing in one call?</p>
