Pass an array to srem, but only if non-empty.