How do I check if Id exist or not in IE7 browser. Below is my code but it does not run successfully in IE7.

```
if(document.getElementById('Username') != null) { 
   alert("In"); 
}

```

When run this code comes true part and show alert box even though Id ('Username) does not exist.