Adding asserts to String filter