Added nil guard around log line