Well, the toLowerCase() is ugly to the eye, but it's actually pretty effective.
All the other solutions will involve more code.
You might want to create a custom function just for this purpose:
Function JSBoolean( test As Boolean ) Returns String
If test Then Return "true"
You could, of course, do it with IIF:
if ( <%= IIF( loResultSet is nothing, "true", "false" )%> )
But I think I like
if ( <%= JSBoolean(loResultSet is nothing) %> )
Finally, you *could* do the test in your VB
<% If loResultSet is Nothing Then %>
code for true condition ...
<% Else %>
code for false condition ...
<% End If %>
And that's actually the most efficient. No point in sending JS
code to the browser when it won't be used.