contract annotations to reduce warnings about potential nullpointer exceptions