Changed determination nvm in system

As noted by @deepsweet in #2236, check if `~/.nvm/nvm.sh` exists is not the best way to determine is there an `nvm` command or not.

I replaced it with `command -v`.