convert datatypes into Decimals

def to_decimal(number, points=None):
    """ convert datatypes into Decimals """
    if not is_number(number):
        return number

    number = float(decimal.Decimal(number * 1.))  # can't Decimal an int
    if is_number(points):
        return round(number, points)
    return number