Better handle NULL args to tt_str_op

For tt_str_op() to pass, both arguments must be non-null.  Formatting
them will no longer fail on systems where %s can't format null.
Add a tt_mem_op operation.