code: @Nullable
    public static final <T extends AbstractSingleton> T getSingletonIfInstantiated (@Nullable final IScope aScope,
                                                                                    @Nonnull final Class <T> aClass)
    {
      ValueEnforcer.notNull (aClass, "Class");
  
      if (aScope != null)
      {
        final String sSingletonScopeKey = getSingletonScopeKey (aClass);
        final Object aObject = s_aRWLock.readLocked ( () -> aScope.attrs ().get (sSingletonScopeKey));
        if (aObject != null)
        {
          // Object is in the scope
          final T aCastedObject = aClass.cast (aObject);
          if (aCastedObject.isUsableObject ())
          {
            // Object has finished initialization
            return aCastedObject;
          }
        }
      }
      return null;
    }
docs: Get the singleton object if it is already instantiated inside a scope or
  <code>null</code> if it is not instantiated.
  
  @param <T>
  The type to be returned
  @param aScope
  The scope to check. May be <code>null</code> to avoid constructing a
  scope.
  @param aClass
  The class to be checked. May not be <code>null</code>.
  @return The singleton for the specified class is already instantiated,
  <code>null</code> otherwise.