Check if the JS_ENGINE key exists as an environment variable before reading it.

Change-Id: I274b23ea53ec0129ea3b52ff66322f7069338f53
diff --git a/tests/DumpRenderTree/assets/run_layout_tests.py b/tests/DumpRenderTree/assets/run_layout_tests.py
index 7f3ef2d..d3726c1 100755
--- a/tests/DumpRenderTree/assets/run_layout_tests.py
+++ b/tests/DumpRenderTree/assets/run_layout_tests.py
@@ -192,7 +192,7 @@
   # JS_ENGINE environment  variable, which is used by the build system in
   # external/webkit/Android.mk.
   js_engine = options.js_engine
-  if not js_engine:
+  if not js_engine and os.environ.has_key('JS_ENGINE'):
     js_engine = os.environ['JS_ENGINE']
   if js_engine:
     run_layout_test_cmd_postfix += " -e jsengine " + js_engine