it handles items == nil case. I looked for some exception similar to Java when accessing nil pointer.