Handle when value is nil

Signed-off-by: hajee <hajee@moretIA.com>