My suggestion below is just a cheap approach to bypass that if you simply want your application to operate and you feel self-assured that a null item right here wont trigger any larger complications I discovered this difficulty when refactoring a functionality to return an object rather than an array, https://propertyingurugram.in/5-years-of-demonetisation-have-things-changed-for-real-estate/