diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDEvents.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDEvents.cpp
index 7a70091ba201661c1c39fef58785803fcfe96ecc..4126ade245dd8b2b0da95693faba2e2837a3fcfe 100644
--- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDEvents.cpp
+++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDEvents.cpp
@@ -168,7 +168,7 @@ ConvertToMDEvents::process_detectors_positions(const DataObjects::Workspace2D_co
   //
   IObjComponent_const_sptr source = instrument->getSource();
   IObjComponent_const_sptr sample = instrument->getSample();
-  if ((!source) || (!sample == NULL )) {
+  if ((!source) || (!sample)) {
     convert_log.error()<<" Instrument is not fully defined. Can not identify source or sample\n";
     throw Exception::InstrumentDefinitionError("Instrubment not sufficiently defined: failed to get source and/or sample");
   }