Added null check.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>