def check_long(lng):
    """
    Checks whether the input longitude is within range and correct type

    Parameters
    ----------
    lng : float or int
        longitude (-179 to 180) in degrees

    Returns
    -------
    None. Raises an exception in case
    """
    if isinstance(lng, (int, float)):
        if abs(lng) > 180:
            raise ValueError('longitude should be -180 <= longitude <= 180')
    else:
        raise TypeError('longitude should be "float" or "int"')
    return None
