check that meta is array before looping