Refactored to shorten, remove rescues, and clarify.
Fixed the stack level too deep errors by using Hash#invert.
Refactor Bio::AminoAcid#weight: Early return clearer and idiomatic.