diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php
index 6be055d218e621c498ab0ac6640891913fcd3ec6..eb286dac0d0a06a7993658f23724f57aec70b3b1 100644
--- a/modules/saml/lib/Message.php
+++ b/modules/saml/lib/Message.php
@@ -492,7 +492,7 @@ class sspmod_saml_Message {
 		/* Validate Response-element destination. */
 		$currentURL = SimpleSAML_Utilities::selfURLNoQuery();
 		$msgDestination = $response->getDestination();
-		if ($msgDestination !== $currentURL) {
+		if ($msgDestination !== NULL && $msgDestination !== $currentURL) {
 			throw new Exception('Destination in response doesn\'t match the current URL. Destination is "' .
 				$msgDestination . '", current URL is "' . $currentURL . '".');
 		}