Here - 'p_name' can never be nil (as it is coming from a property set) so, p_name == nil should be replaced with MCStringIsEmpty(p_name).