JS Vérifiez si la fonction est disponible dans la portée

if (typeof me.onChange === "function") { 
    // safe to use the function
}
Eager Elephant