Error checks.