Add NULL ptr check for tpc_level and tpc_attr. Change-Id: I12f25f875517418efd3566747ae191ad343f153e CRs-Fixed: 3714146