sdk: Avoid NPE when receiving null lists

Currently we don't check if the received list of headers is null, and
this causes a NPE.

Change-Id: I5a844fb0e69330a7b1f3949802f016a27391b113
Bug-Url: https://bugzilla.redhat.com/1119812
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>