Add condition to check if project exists