Replaced 'match' with 'if let'.