Extracting keys from a key-value list where keys must be identifiers.