Update main_adapter.rb

support for Rails 4 add_reference:
check options for nil?