check post type before processing