strdup(NULL) protection