Added Ruby style for processing arrays that might be nil.