Remove dependency on presence of region field.

The region field for the S3 input is deprecated in favor of region_endpoint, however logstash will fail calling .empty? on nil if the field is not present. This simply checks that @region is not nil before checking if it is empty.