def _call_member(obj, name, args=None, failfast=True):
    """ Calls the specified method, property or attribute of the given object

    Parameters
    ----------
    obj : object
        The object that will be used
    name : str
        Name of method, property or attribute
    args : dict, optional, default=None
        Arguments to be passed to the method (if any)
    failfast : bool
        If True, will raise an exception when trying a method that doesn't exist. If False, will simply return None
        in that case
    """
    try:
        method = getattr(obj, name)
    except AttributeError as e:
        if failfast:
            raise e
        else:
            return None
    if str(type(method)) == '<type \'instancemethod\'>':  # call function
        if args is None:
            return method()
        else:
            return method(*args)
    elif str(type(method)) == '<type \'property\'>':  # call property
        return method
    else:  # now it's an Attribute, so we can just return its value
        return method