[js] assert exceptions on Function.Apply/Function.call with invalid args