Handled edge case with nested tags and empty values