fix NPE on MethodFormat.getCodeSource suggest by @brasmusson

This fix same issue of PR: https://github.com/cucumber/cucumber-jvm/pull/751

@brasmusson suggest this approach and here is code.


This does not conform to the 4 space indent specified in [Contributing.md](https://github.com/cucumber/cucumber-jvm/blob/master/CONTRIBUTING.md#contributinghacking), (and neither did the example code I wrote in the [comment in PR-751](https://github.com/cucumber/cucumber-jvm/pull/751#issuecomment-50985660)).
I fixed the indenting when I merged the PR.