- // Get a points instance from registry
- $pointsInstance = Registry::getRegistry()->getInstance('points');
+ try {
+ // Get a points instance from registry
+ $pointsInstance = Registry::getRegistry()->getInstance('points');
+ } catch (NullPointerException $e) {
+ // Instance not found in registry
+ // @TODO We should log this exception later
+ }