Throw error before attempting to read non-tree object.