Small null check on entity for mods that are non-compliant with Forge

*cough* Thaumcraft *cough* Basically fixes all of the divining rod crashes
people have complained about.

Even in a perfect world, it's always best to do a null check on objects from an API before using a method on them. Especially in the world of Minecraft modding :D