Simple input validation.