This is a bit pedantic but it would be better to check that `!api_key.nil? && !api_key.empty?`. Reads a little nicer.