Checks whether val is a valid user data value.
val
This means, value is not null, not too large and valid UTF-8.
the value to check
true if val is a valid user data value.