Fix potential Null deref.