fix an issue in prompt for value.

Handle null case in callback so that ‘Cancel’ button will not change
existing value.