code: def to_location(location):
          
          if not location:
              raise SbgError('Location is required!')
          if isinstance(location, six.string_types):
              return location
          else:
              raise SbgError('Invalid location parameter!')
docs: Serializes location to string
          :param location: object to serialize
          :return: string