def query_default(param, args):
    """
    Allow for a parameter to be queried, and return defaults for those not provided.

    Parameters
    ----------
    param : str
        The parameter being queried
    args : object
        Namespace object

    Returns
    -------
    Queried value or default

    """
    vargs = vars(args)
    default = vargs[param]
    if 'unittesting' in vargs.keys():
        v = vargs['unittesting']
    else:  # pragma: no cover
        s = '{} [{}]:  '.format(param, str(default))
        v = input(s)
    if len(v) == 0:
        return default
    if v.lower() == 'none':
        return None
    if v.lower() == 'false':
        return False
    if v.lower() == 'true':
        return True
    return v