added null condition to object