In my profile, I created a custom property as follows.
<property name="CustomProperty" displayName="Custom Property">
<propertyType>
<externalTypeMoniker name="/CSharp/CustomProfilePropertyTest.CustomProfileProperty,
CustomProfilePropertyTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=85ad269937e53329" />
</propertyType>
</property>
When speaking of an error that my parameter type can not be null.