Handle nil
cmd in start_or_attach
error handling
#732
Merged
nil
cmd in start_or_attach
error handling
#732