def round_if_int(val):
    """
    Rounds off the decimal of a value if it is an integer float.

    Parameters
    ----------
        val : float or int
            A numeric value to be rounded.

    Retruns
    -------
        val : int
            The original value rounded if applicable.
    """
    if isinstance(val, float) and val.is_integer():
        val = int(val)

    return val