Crashing bug in replacePlaceholdersAndPrintStringFromBlock:

The method stringByReplacingOccurrencesOfString:withString: throws an
exception if the withString: parameter is nil!  Added checks to make
sure we have a value before trying to do the replacement.

A simple example to test this is to run the following code snippet as a terminal app:
    NSString* hello = @"Hello, World!";
    hello = [hello stringByReplacingOccurrencesOfString:@"World" withString:nil];

You'll get an exception because you've passed in a nil argument in the withString: parameter.