check limit value safely