Check for null pointer when parsing identities.

Change-Id: I5dba7506b83f145472f7327f92e47ffc17b74062
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Merge "Check for null pointer when parsing identities."