Error checking for arguments