layout.pack.rows can handle defaults for undefined parameters.
Added comment for Array.isArray usage.