def METHOD_NAME(self, option):
    """ Get option from configuration.
    If the option is not specified in the configuration or is of invalid
    type, return default value. If there is no default value,
    None is returned
    """
    default_value = self._defaults.METHOD_NAME(option)
    get_function = self._type_function(default_value)
    try:
        value = get_function(option)
    except ValueError as error:
        value = None
        log.warning('Invalid configuration value "%s" for %s in %s: %s',
                    self._section.METHOD_NAME(option), option, self._section_name,
                    error)
    if value is None and default_value is None:
        raise ValueError(
            'No valid configuration value or default value was '
            'found for %s in %s'.format(option, self._section_name))
    elif value is None:
        return default_value
    else:
        return value