A simple thing to remember while working with Static Methods. Static methods/variables belong to class and not to a particular object.
Take your case for example
An an = null; an.prt();
In this case the object an is replaced by its reference. SO the function call becomes An.prt(). And the question of the object pointing to null doesnt come into picture, since we are never using the object.
A simple call to prt() would have also sufficed.
Read more about "Overidding vs Shadowing in Static methods". This will help you in grasping the subtlities about the static keyword.