Add hasMethod to DynamicObject

Use case : verify if a method is define in a DynamicObject

Today, i've to do that :

    let isImplemented = |method, object| {
      let properties = object: properties(): filter(|property|-> property: getKey(): equals(method))
      if properties: size(): equals(1) {
        return isClosure(properties :iterator(): next(): getValue())
      }
      return false  
    }

    let isObservable = |object| {
      return isImplemented("attach", object) and isImplemented("notify", object) 
    }  

Now i could write this :

    let isObservable = |object| {
      return object: hasMethod("attach") and object: hasMethod("notify") 
    }