prevent undefined errors when there is no value or only 1 value for select multiples