Error checking.