added error checking to Insights and Definitions elements