diff --git a/pkg/ottl/contexts/internal/value.go b/pkg/ottl/contexts/internal/value.go
index f89db47b19b7..90e2697ad5e6 100644
--- a/pkg/ottl/contexts/internal/value.go
+++ b/pkg/ottl/contexts/internal/value.go
@@ -90,8 +90,8 @@ func getIndexableValue[K any](ctx context.Context, tCtx K, value pcommon.Value,
 				if err != nil {
 					return nil, err
 				}
-				resString, ok := res.(string)
-				if !ok {
+				resString, okk := res.(string)
+				if !okk {
 					return nil, fmt.Errorf("err")
 				}
 				s = &resString