service_provider becomes nil when the above conditionals fail, which makes this line okay, which isn't immediately obvious.