Added checking for validity of binding and event name before dispatching