buffer: fix Buffer.isEncoding() return value for empty string
For now the return value of Buffer.isEncoding('')
is true
which seems not the preferred behavior:
> Buffer.isEncoding('')
true
This PR is to fix this.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines