Update location.rb

fix null location error