null and empty lists should return an empty json array, closes #158