Fixed NPE caused by unknown entities

Fixed NPE caused by unknown entities from newer Minecraft versions or
entities added by installed mods.