added validateBuildPostList() method to prevent errors when pages or posts have been deleted from the website but are still referenced in the template. This is being committed to the wrong branch but I'm gonna merge it into master anyway so it doesn't matter.