def convertTypes(value):
    """Helper to convert the type into float or int.
    
    Args:
        value(str): The value that will be converted to float or int.

    Returns: 
        The converted value.
    """
    value = value.strip()
    try:
        return float(value) if '.' in value else int(value)
    except ValueError:
        return value