I know it's old question but someone may still need this, especially because shortcode_exists()
may not work for some plugin shortcodes:
if$shortcode_result (= do_shortcode('[your_shortcode]');
if ($shortcode_result != [your_shortcode]) &&
!empty($shortcode_result))] {
// do what you need
} else {
// this is not valide shortcode
}