Add hasMethod to DynamicObject

a handy little helper,
Sometimes, it is interesting to know whether a DynamicObject has a method or not :

Today, i have to do that :

    let isUpdatable = |object| {
      let properties = object: properties(): filter(|property|-> property: getKey(): equals("update"))
      if properties: size(): equals(1) {
        return isClosure(properties :iterator(): next(): getValue())
      } else {
        return false
      }
    }    

    isUpdatable(DynamicObject(): define("update", |this| -> "foo"))

And now, I could do it like this :

    (DynamicObject(): define("update", |this| -> "foo")): hasMethod("update")