If there's no current service provider don't throw when getting it
- Code more defensively to handle nulls using C# 6 hotness