Added a check to make sure the PT XML is valid

This should fix errors with invalid stories, like PT:0