Made some object accessors slightly safer