Added a check that the content type is valid before saving a piece of content.