Add proper existence check in setProp()