Treat json array types are empty when they are either null or contain no elements
add more tests