Adding msg is null condition and log info