Add an entity type check to avoid exceptions.

Getting a lot of ClassCastExceptions from CraftSpiders and CraftWolves. This fixes it.