There's a lot of duplicate code in this for loop, please simplify. Also please avoid long statements to improve readability.
E.g. key_name = '{0}.{1}'.format(check_type, key.lower()) would already go a long way.