This fix tries to fix the crash caused by `docker service inspect --pretty`,
by performing necessary nil pointer check.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b6857e91c1625695abbf5897e13f688028880c33
Component: engine