def str_to_type(arg):
    """Determine if a string can be converted into an int or float

    Arguments:
        arg: (string)

    Returns:
        str, float or int version of the input, depending on whether the input
        is numeric and then whether it contains a decimal point.
    """
    try:
        float(arg)
    except ValueError:
        if arg == 'None':
            return None
        return str(arg)
    if arg.find('.') == -1 and arg.find('e') == -1:
        return int(arg)
    return float(arg)