function _filterAttributes(attributes, name) {
  const filteredAttributes = Object.create(null)
  Object.keys(attributes).forEach((attributeKey) => {
    if (!isValidType(attributes[attributeKey])) {
      logger.info(
        `Omitting attribute ${attributeKey} from ${name} call, type must ` +
          'be boolean, number, or string'
      )
      return
    }
    filteredAttributes[attributeKey] = attributes[attributeKey]
  })
  return filteredAttributes
}
Function for removing invalid attribute key/value pairs from an object

@private
@param {object} attributes The attribute object
@param {string} name Caller name, used for debugging/logging purposes only
@returns {object} Attribute object containing only valid key/value pairs