javascript check if element with id exists