Hey @pmwhelan
There may be many moments when you will get null values. For this I would suggest you to use the following expression:
if(equals(length(body('GetFilesPO')?['body/value']),null),0,length(body('GetFilesPO')?['body/value']))
Or the below expression:
if(equals(body('GetFilesPO')?['body/value'],null),0,length(body('GetFilesPO')?['body/value']))
So, I am checking if the above expression is equal to null or nor, if it equals null, then give length 0, otherwise the normal value.
Hopefully this will work.
If this works for you, you can marks this as a solution. You can give a thumbs up as well. 🙂