Index: src/wp-includes/meta.php
===================================================================
--- src/wp-includes/meta.php	(revision 25952)
+++ src/wp-includes/meta.php	(working copy)
@@ -753,7 +753,7 @@
 		// Split out the meta_key only queries (we can only do this for OR)
 		if ( 'OR' == $this->relation ) {
 			foreach ( $this->queries as $k => $q ) {
-				if ( ! isset( $q['value'] ) && ! empty( $q['key'] ) )
+				if ( ! array_key_exists( 'value', $q ) && ! empty( $q['key'] ) )
 					$key_only_queries[$k] = $q;
 				else
 					$queries[$k] = $q;
@@ -774,6 +774,9 @@
 			$meta_key = isset( $q['key'] ) ? trim( $q['key'] ) : '';
 			$meta_type = $this->get_cast_for_type( isset( $q['type'] ) ? $q['type'] : '' );
 
+			if ( array_key_exists( 'value', $q ) && is_null( $q['value'] ) )
+				$q['value'] = '';
+
 			$meta_value = isset( $q['value'] ) ? $q['value'] : null;
 
 			if ( isset( $q['compare'] ) )
Index: tests/phpunit/tests/meta/query.php
===================================================================
--- tests/phpunit/tests/meta/query.php	(revision 25952)
+++ tests/phpunit/tests/meta/query.php	(working copy)
@@ -105,4 +105,18 @@
 		$this->assertEquals( 1, substr_count( $sql['where'], "$wpdb->postmeta.meta_key = 'my_third_key'" ) );
 
 	}
+
+	/**
+	 * @ticket 22967
+	 */ 
+	function test_null_value_sql() {
+		global $wpdb;
+
+		$query = new WP_Meta_Query( array(
+			array( 'key' => 'abc', 'value' => null, 'compare' => '=' )
+		) );
+		$sql = $query->get_sql( 'post', $wpdb->posts, 'ID', $this );
+
+		$this->assertEquals( 1, substr_count( $sql['where'], "CAST($wpdb->postmeta.meta_value AS CHAR) = '')" ) );
+	}
 }
