val_has_length function

Test that the value of the expression has a particular length.