<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def if_not_exists(self):
 """ Check the existence of an object before insertion. If the insertion isn't applied, a LWTException is raised. """

        if self.model._has_counter:
            raise IfNotExistsWithCounterColumn('if_not_exists cannot be used with tables containing counter columns')
        clone = copy.deepcopy(self)
        clone._if_not_exists = True
        return clone