Added a check to verify if the assertion is violated.