Add missing null pointer check in -ftime-trace code
createOutputFile diagnoses the error for the caller already, so recover
by not writing the output.
No test, since I couldn't think of a good, portable, simple way to make
the regular -o output file writable, but outputfile.json not writable.