Consider the following code:
var trivia = SyntaxFactory.SyntaxTrivia(SyntaxKind.WhitespaceTrivia, " ");
var location = trivia.GetLocation();
This code will throw a NullReferenceException because the implementation assumes there is a SyntaxTree available and there is not in this case. The code should be validating this and throwing a better exception type here.