[CDA-68] - Added check for null response when setting headers