Pass value().as_slice() for attribute testing to avoid an extra allocation.