public static void shutdown(ExecutorService service) {
    if (service != null) {
      if (!service.isShutdown()) {
        service.shutdown();
      }
    }
  }
Checks if the given key exists in the given JsonObject with a valid value.

@param jsonObject JsonObject
@param key        key
@param valueClass Class object for the value of the key.
@param isOptional A boolean specifying that the value may be optional. Note: This only works if the valueClass is String.

@return the value of the key
@throws KiteNoKeyException    if the key is not mapped in the JsonObject.
@throws KiteBadValueException if the value of the key is invalid.
KITE-Framework/src/main/java/org/webrtc/kite/Utils.java