Better do

    headers = options['headers'] || {}

in case it's blank.