Check if a placeholder and its parent node exist before removing