Added NPE fix for WeakReference in PmObjectBase