You don't need else here. An if that does not match returns nil by default. Same below.