ID get typeof item from pageItems
alert (app.activeWindow.activePage.pageItems[0].getElements()[0].constructor.name);