javascript check if html element exists