if (!data) {
if (!data || !jvalue) {
JNIEXPORT void JNICALL Java_org_mozilla_dom_CharacterDataImpl_insertData  (JNIEnv *env, jobject jthis, jint offset, jstring jvalue){  nsIDOMCharacterData* data = (nsIDOMCharacterData*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!data) {    JavaDOMGlobals::ThrowException(env,        "CharacterData.insertData: NULL pointer");    return;  }    const char* value = NULL;  jboolean iscopy = JNI_FALSE;  if (jvalue) {      value = env->GetStringUTFChars(jvalue, &iscopy);      if (!value) {	  JavaDOMGlobals::ThrowException(env,  	    "CharacterData.insertData: GetStringUTFChars failed");	  return;      }  }  nsresult rv = data->InsertData((PRUint32) offset, value);  if (iscopy == JNI_TRUE)    env->ReleaseStringUTFChars(jvalue, value);  if (NS_FAILED(rv)) {    JavaDOMGlobals::ExceptionType exceptionType = JavaDOMGlobals::EXCEPTION_RUNTIME;    if (NS_ERROR_GET_MODULE(rv) == NS_ERROR_MODULE_DOM &&        (rv == NS_ERROR_DOM_INDEX_SIZE_ERR ||         rv == NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR)) {      exceptionType = JavaDOMGlobals::EXCEPTION_DOM;    }    JavaDOMGlobals::ThrowException(env,      "CharacterData.insertData: failed", rv, exceptionType);    return;  }}