def is_number(var):
    """
    Checks whether an string is a number, if is already an integer or float it also returns True
    
    :param factor: :py:func:`str` :py:func:`int` :py:func:`float` variable to check
    
    :returns: :py:func:`boolean` True when input variable is a number otherwise False
    
    """
    try:
        float(var)
        return True
    except ValueError:
        return False
