if the $headers arg is null (otherwise known as new) then turn it into an array.