Only use the name option if it is a string

[closes #1778]
Merge pull request #1784 from jadejs/fix-name-cli-option

Only use the name option if it is a string. Fixes #1778