Fix NPE in entity AI code

This will prevent server from crashing, caused by a skeletons, shooting each other. Fixes #168.