Add function to check whether a constraint has been added to a solver