Error checking.

Item error checking logic dirty way completed.