Fix NullPointerException handling in StaticLookup