check if html id exists javascript