Add more checks to prevent invalid parametrization.