Calling getInputs() on a function with no parameters produces an error:
getInputs(function() {})
# Error in validObject(.Object) :
# invalid class "ScriptNodeInfo" object: invalid object for slot "outputs" in class "ScriptNodeInfo":
# got class "NULL", should be or extend class "character"
The error goes away if you add a parameter to the function.