 parseDescription = (iq) ->
   result = desc: {}, attributes: {}, methods: {}, classes: []
   describe = iq.getElementsByTagName("describe")[0]
-  for c in describe.childNodes
-    switch c.tagName.toLowerCase()
-      when "desc"
-        result.desc[c.getAttribute "xml:lang"] = c.textContent
-      when "attributedescription"
-        ad = parseAttributeDescription c
-        result.attributes[ad.name] = ad
-      when "methoddescription"
-        md = parseMethodDescription c
-        result.methods[md.name] = md
-      when "superclass"
-        result.superclass = new JID(c.textContent).toString()
-      when "timestamp"
-        result.timestamp = c.textContent
-      when "class"
-        classes.push = c.textContent
+  if describe?
+   for c in describe.childNodes
+     switch c.tagName.toLowerCase()
+       when "desc"
+         result.desc[c.getAttribute "xml:lang"] = c.textContent
+       when "attributedescription"
+         ad = parseAttributeDescription c
+         result.attributes[ad.name] = ad
+       when "methoddescription"
+         md = parseMethodDescription c
+         result.methods[md.name] = md
+       when "superclass"
+         result.superclass = new JID(c.textContent).toString()
+       when "timestamp"
+         result.timestamp = c.textContent
+       when "class"
+         classes.push = c.textContent
   result
 
 getAddress = (clazz, service, instance) ->

edit = (instance, attrs, cb) ->
  sendRequest "edit", instance, cb,
    beforeSend: (iq) -> addXMLAttributes iq, attrs
    onResult: parseAttributes

search = (clazz, attrs, cb) ->
  if typeof attrs is "function"

    .getElementsByTagName("value")[0]

parseNewAddress = (iq) ->
  a = iq.getElementsByTagName("newAddress")[0]
  if a? then new JID(a.textContent).toString()
  else undefined

parseSearch = (iq) ->
  items = iq.getElementsByTagName("item")
