pre_output - error with empty array

Installed module but was getting and error in the "foreach" loop as the array was empty, may have been from data from previous installation of list field type. Suggesting adding a conditional to check $input has data and check if it is actually an array.
Merge pull request #1 from caleuanhopkins/patch-1

pre_output - error with empty array