if id exists javascript