Possible fix for null pointer when generating tests.