fix potential segf, if band is null