Return task with empty "format" property will fail
### Expected Behavior

_No response_

### Actual Behaviour

Failing due to length check for metrics, needs a null guard

### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version:
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

_No response_
core/src/main/java/io/kestra/core/tasks/debugs/Return.java
core/src/main/java/io/kestra/core/tasks/debugs/Return.java
diff --git a/core/src/main/java/io/kestra/core/tasks/debugs/Return.java b/core/src/main/java/io/kestra/core/tasks/debugs/Return.java
index 532986dca3..279d3af677 100644
--- a/core/src/main/java/io/kestra/core/tasks/debugs/Return.java
+++ b/core/src/main/java/io/kestra/core/tasks/debugs/Return.java
@@ -15,6 +15,7 @@
 import org.slf4j.Logger;
 
 import java.time.Duration;
+import java.util.Optional;
 
 @SuperBuilder
 @ToString
@@ -56,7 +57,7 @@ public Return.Output run(RunContext runContext) throws Exception {
         long end = System.nanoTime();
 
         runContext
-            .metric(Counter.of("length", render.length(), "format", format))
+            .metric(Counter.of("length", Optional.ofNullable(render).map(String::length).orElse(0), "format", format))
             .metric(Timer.of("duration", Duration.ofNanos(end - start), "format", format));
 
         return Output.builder()
