Consider replacing this function as a lookup table. ex:
` var apnTypes = {
  'data': 'default',
  'mms': 'mms',
  'supl': 'supl'
};`