Checks whether the list of constraints has a constraint with the given
name and given value.
Goes through all constraints and compares the name and if value is not
null also the given value.
Checks whether the list of properties has a property with the given name
and given value.
Goes through all properties and compares the name and, if value is not
null, also the given value.