import decimal


def convert_to_decimal_if_float(x):
    """Convert value to float to Decimal.

    Arguments:
        x {any} -- The value to test and convet if float.

    Returns:
        any -- Decimal if x is a float, otherwise x
    """
    if isinstance(x, float):
        return decimal.Decimal(x)
    else:
        return x