How about `!isempty(str) && str[start(str)] in chars && return true`?