def _cim_property_decl(key, value):
    """
    Return a CIMProperty object for representing a property declaration, from
    dict item input (key+value), after performing some checks.

    The input value must be a CIMProperty object, which is returned.
    """

    if key is None:
        raise ValueError("Property name must not be None")

    try:
        assert isinstance(value, CIMProperty)
    except AssertionError:
        raise TypeError(
            _format("Property must be a CIMProperty object, but is: {0}",
                    type(value)))

    if value.name.lower() != key.lower():
        raise ValueError(
            _format("CIMProperty.name must be dictionary key {0!A}, but is "
                    "{1!A}", key, value.name))

    return value
Return a CIMProperty object for representing a property declaration, from
    dict item input (key+value), after performing some checks.

    The input value must be a CIMProperty object, which is returned.