Added error handling for missing values, pointers and cross-references.