javascript check if child element exists