Returns the document identified by spec.
Returns the document identified by spec, or null if not found.