function getAttributeValue(props, attr) {
  const scaleObject = getScaleObjectFromProps(props, attr);
  if (scaleObject) {
    if (!scaleObject.isValue && props[`_${attr}Value`] === undefined) {
      warning(
        `[React-vis] Cannot use data defined ${attr} for this ` +
          'series type. Using fallback value instead.'
      );
    }
    return props[`_${attr}Value`] || scaleObject.range[0];
  }
  return null;
}
Tries to get the string|number value of the attr and falls back to
a fallback property in case if the value is a scale.
@param {Object} props Series props.
@param {string} attr Property name.
@returns {*} Function or value.