Check if current site ID and value exist in WPDB

Note that you should be able to map domains without 3rd party plugins.

Here’s an untested suggestion for your callback in your current situation:

global $wpdb;

// Nothing to do if not multisite
if( ! is_multisite() )
    return;

// Define the custom table
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';

// Check if the custom table exists
if ( $wpdb->dmtable != $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->dmtable}'" ) )
    return;

// Check if current site is mapped  
$domain_exists = (bool) $wpdb->get_var( 
    $wpdb->prepare( 
        "SELECT COUNT(blog_id) 
             FROM {$wpdb->dmtable} 
             WHERE blog_id = %d AND active = 1 LIMIT 0,1", 
        get_current_blog_id() 
    )
);

if( $domain_exists )
{
    // do something
}