Input validation w/ tests.