diff --git a/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java b/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java
+++ b/core/src/test/java/org/hibernate/ogm/backendtck/queries/JpaQueriesTest.java
@@ -152,10 +152,12 @@ public class JpaQueriesTest extends JpaTestCase {
 
 	@After
 	public void closeEmAndRemoveEntities() throws Exception {
-		em.getTransaction().commit();
-		removeEntities();
-		em.close();
-
+		//Do not hide the real cause with an NPE if there are initialisation issues:
+		if ( em != null ) {
+			em.getTransaction().commit();
+			removeEntities();
+			em.close();
+		}
 	}
 
 	@Override
OGM-<I> Make sure the JpaQueriesTest doesn't hide the real cause when failing to initialize