Change check on node instead of property

Corrected check before removing "unique" property to actually check for existing property instead of node.