Adding a condition to check for the element's existence before setting f...

...ocus