function getStringValue(name) {
  // Property names must be strings. This means that non-string objects cannot be used
  // as keys in an object. Any non-string object, including a number, is typecasted
  // into a string via the toString method.
  // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names
  //
  // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it
  // to a string. It's not always possible. If `name` is an object and its `toString` method is
  // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown:
  //
  // TypeError: Cannot convert object to primitive value
  //
  // For performance reasons, we don't catch this error here and allow it to propagate up the call
  // stack. Note that you'll get the same error in JavaScript if you try to access a property using
  // such a 'broken' object as a key.
  return name + '';
}
@ngdoc method
@name $sce#trustAs

@description
Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a
wrapped object that represents your value, and the trust you have in its safety for the given
context. AngularJS can then use that value as-is in bindings of the specified secure context.
This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute
interpolations. See {@link ng.$sce $sce} for strict contextual escaping.

@param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,
    `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.

@param {*} value The value that that should be considered trusted.
@return {*} A wrapped version of value that can be used as a trusted variant of your `value`
    in the context you specified.