Making code to check that all body syntax trees are correctly formed