Checking a NULL value for true results in an error

The previous commit correctly did not print the progress bar when
knitting, but it also threw an error when not knitting, this commit
fixes the issue in both cases