Only null-terminate the parts if we were passed a pointer.