This question and answer from StackOverlow - https://stackoverflow.com/questions/38603138/transit-mkdirectionsrequest-produces-null-error-error-domain-mkerrordomain-code from 4 years ago (!) suggests:
Routing directions for transit is currently not supported (iOS 9). MKDirectionsRequest will return a null error, as you observed. This only seems to be documented directly in MapKit's headers. I am trying to implement transit directions as well, with the transportType field set to .transit, and getting the same null error.