CollectionInputFilter throws warning if invalid collection provided

invalid value for foreach that means not traversable or iteratable array

throws php Warning: `Invalid argument supplied for foreach()`
Trailing whitespace should be removed