Added null pointer guards to shared manager implementation. Closes #217.