why do you need a cast here? `CompilationResult` is a class anyway and can be compared with null correctly, alternatively you can use `ReferenceEquals(input, null)`.