added a validation for the callback JS method name.