Installing shouldn't break if formula missing

Fixes Homebrew/homebrew#28847

As noted, when homebrew can't find the formula it raises a `FormulaNotFound` error, but the install check doesn't actually catch that error. This results in an incorrect error message eventually.

I also think a nil rescue is bad, but I'm not sure what to log to?