Make sure tasks is an array.