Merge "diag: Add NULL pointer checks for mask info"