Now I'm the one being weirded out by implicit *or* explicit `nil`.

``` Ruby
def self.authenticate_provider(username, key)
  provider = where(api_username: username).first

  if provider && provider.api_key == key
    provider
  else
    nil
  end
end
```

I'm not a huge fan of `nil` to begin with, so I'm not sure I'd be happy with any form of this that still involves `nil`, though.