I discovered this problem when refactoring a purpose to return an object as opposed to an array, but I forgot to update the return value inside the if assertion. I will not likely down vote but urge Devs to consider this as opposed to have null / empty checks as https://smartworldeveloper.in/