The reason why largerrits corrected you is because it is okay for something to be null, so that line is not really an error and is a perfectly valid line of code. It is only an error if/when later you dereference it to access something within the null instance. In programming it is important to be precise.
The whole null thing can be a pain though especially in a situation like modding where you didn't write the rest of the code so it isn't always clear when something may be null. You can be safe and check everything for null before using it but that is unwieldy and seems like a waste of code (imagine if in every method you had to test every parameter for null). That is why the Nullable and Non-Null annotation is a welcome addition to Forge -- it really makes it clear when you should handle the null case.
Tip: In fact you can usually configure your IDE to analyze this for you -- so if the entityHit() method was annotated with Nullable annotation it would have warned him (warning or error depending on how you configure your preferences) when he tried to use setDead().