def get_param_val(param):
    """
    Given a param, if it is not None, returns param.val, else returns None.
    """
    if param is None:
        return None
    return param.val

    Given a param, if it is not None, returns param.val, else returns None.
    
coremltools/converters/mil/mil/ops/defs/_utils.py