Size of JSON array

Ohh, there could be some other issue.
Array.length can never give you null, if it’s not an array but an object then it will give you an undefined.

I think the x is actually an object here which already has a property length with a value null

Can you write console.log(x, Array.isArray(x)); and open Postman console and show the result after you send the request?
Feel free to retract any sensitive information.