fs: ensure nullCheck() callback is a function
Currently, nullCheck()
will attempt to invoke any truthy value as a function if the path
argument contains a null character. This commit validates that the callback is actually a function before trying to invoke it. fs.access()
was vulnerable to this bug, as nullCheck()
was called prior to type checking its
callback.