Add a missing guard

A guard to check if a list given to reduce is empty was missing. This caused the tool to crash for some input models.