Test if error is nil before to log it
Test if error is nil before to log it

Signed-off-by: nmengin <418d940643b1975d62234ee01246ad4b58904184@containo.us>

dperny/swarmkit-1,docker/swarmkit,dperny/swarmkit-1,docker/swarmkit