only adding metabox if post_type_object is valid - links is not a valid post type and produces an error