You can use the val subcommand to check certain assertions about a history file. val always checks for the following conditions:
Corrupted history file.
The history file can't be opened for reading
The file is not in SCCS history.
If you use the -r option, val checks to see if the indicated SID exists.