Expand utils.isEmpty to do more than array empty checks