FIX: check for expedition batch lines

check if expedition batch lines are available before foreach
Merge pull request #2161 from fappels/3.7

FIX: check for expedition batch lines