Merge pull request #16 from benoitf/IDEX-679

IDEX-679 : Headers can be null so avoid NPE here
IDEX-679 : avoid NPE