Menu? getMenu(Page page) { if (hasMenu()) { return page.page[Pointer.fromJson(models?['menu'])?.getReference()] as Menu?; } return null; }