Added short-circuit when items/resources are empty