added null check along with empty string check as last commit changes were breaking older jobs