add additional return checks and asserts to avoid: C6102: Using 'XXX' from failed function call ... (cherry picked from commit 9b228b5416) Change-Id: I51f5fa630324e0cd7b2d9fceefecb4f4021474b1
9b228b5416