I'm retrieving different custom and default user properties from the my sites profile in a webpart.
The Problem is, if i'm trying to retrieve profile information which hasn't been set yet the webpart throws a System.NullReferenceException.
How can i check if the property is set to work around that problem?
result = u[property].Value.ToString();– Peter Aug 30 '11 at 8:52