ash: prevent null-pointer exception with local variables

A local variable can have a null text pointer:  if so, don't call
strlen.  localvar_copy handles this correctly because nodeckstrdup
doesn't try to copy from the null pointer.