let is_a obj typ =
    Gobject.Type.is_a (Gobject.get_type obj) typ