Add pre- and post-conditions to metadata extraction functions.