Fix NPE when looking up item/block.

Signed-off-by: Chris Sanders <zidane@outlook.com>