If you're suppressing the error message here, does it make sense to combine these into a single conditional?

Does it make sense to have a default gain?