added else to set nodeValue

In order to ensure the field is cleared, we are using nodeValue which
would have the equivalent result when using an empty string