def normalize_case(s):
    """
    Convert to lower case if possible.

    Used internally to allow keys that are not strings.
    Will use casefold if available (Python >= 3.3).
    """
    try:
        return s.casefold()
    except AttributeError:
        try:
            return s.lower()
        except AttributeError:
            return s