checkType will work in for loops as well, with the power of the i variable
local links = {}
for i, t in ipairs(pages) do
if typecheckType(t) ~= 'table' then error(string.format( "bad argument #%d to '_formatPageTables' (table expected, got %s)",i, type(t) ), 2'table') end