def getInt(val):
    """
    Converts a string to an integer with a null check

    Parameters
    ----------
    val : str
        The value to convert to an integer

    Returns
    -------
    val : int
        Returns converted str value to an int

    Raises
    ------
    None
    """
    if(val is None):
        val = 0
    else:
        val = int(val)
    return val