You should print a possibly nil value using .inspect, which works fine for nil (i.e. nil.inspect == "nil"). Doing it this way has the possibility of printing an erroneous dev_log_level value of false as 'nil'.