The callback id is set by the native code, so I don't think it needs to be validated anywhere. The validation for other parameters is to ensure the proper types were passed to the JavaScript APIs. I've removed this line.