Fix json_array_get throws NPE

Fix for #922