[javascript] How best to determine if an argument is not sent to the JavaScript function