added some checking for setting nsnull to a user default value