Null pointer debug for bags