You can wrap your output in the has_excerpt
function, this checks if the post has a custom excerpt.
if (!function_exists('sociality_excerpt_more')) {
function sociality_excerpt_more($more) {
if ( has_excerpt() ) {
return $more . ' <a class="read-more p-color" rel="bookmark" title="'. get_the_title() .'" href="'. get_permalink($post->ID) . '">'. esc_html__('View more','g5plus-handmade') .'<i class="pe-7s-right-arrow"></i></a>';
} else {
return $more;
}
}
add_filter('the_excerpt', 'sociality_excerpt_more');
}