Adding input checks.