I stumbled on this problem when refactoring a functionality to return an object instead of an array, but I forgot to update the return benefit In the if statement. I won't down vote but urge Devs to consider this as opposed to have null / vacant checks inside your property https://whitelandgurugram.co.in/