Introduce constants for constraint types. Remove some unneeded checks.