Tentativo: prova a concatenare una stringa vuota...

if(""+resp) { dinamic_nv = document.createTextNode(""+resp);}