It looks good, but without further review I'm not sure why it's better to return nil if the match is empty.