Asserts that the layout is not empty.
layout
static void checkNotEmpty(Layout layout, [String? name]) { if (layout.length == 0) { throw LayoutError.empty(layout, name); } }