Fix bug with empty arguments in `nwrap` function
Add tests