Properly catch registered-service-providers when null