Fixed NPE on getting null item of collection.

Fixed NullPointerException on getting null item of collection. Should fix issue #78.