Stop loop if the nested array is null - fix #13