Bug 525353 - [9] Java 9 Application Start Delivers NullPointerException

Change-Id: I1f320ce73f03a5a86a59613b850ed51f351b4f8d
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
index 7472fdf..bc44bb4 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
@@ -982,13 +982,13 @@
 	 * @since 3.10
 	 */
 	public static boolean isModule(IClasspathEntry entry, IJavaProject proj) {
+		if (entry == null) {
+			return false;
+		}
 		if (!isModularProject(proj)) {
 			return false;
 		}
 
-		if (entry == null) {
-			return false;
-		}
 		for (IClasspathAttribute classpathAttribute : entry.getExtraAttributes()) {
 			if (classpathAttribute.getName().equals(IClasspathAttribute.MODULE) && "true".equals(classpathAttribute.getValue())) {//$NON-NLS-1$
 				return true;