item and toItem in constraints can now be strings or objects