Check get_post_type_object() returns an object before using it
Merge pull request #656 from NateWr/develop

Check get_post_type_object() returns an object before using it