def get_conf_from_module(mod):
    """return configuration from module with defaults no worry about None type

    """

    conf = ModuleConfig(CONF_SPEC)

    # get imported module
    mod = _get_correct_module(mod)

    conf.set_module(mod)

    # extarct from default object or from module
    if hasattr(mod, 'default'):
        default = mod.default
        conf = extract_conf_from(default, conf)
    else:
        conf = extract_conf_from(mod, conf)
    return conf
return configuration from module with defaults no worry about None type