checking if the task is already created or not before creating a new one