Fixing `string.isEmpty()` for when it receives `undefined`, added unit tests