Restore truthiness check to `visible`

jQuery's `toggle` function only treats the passed argument as a visibility flag if the argument is a boolean. This commit restores backwards compatibility by coercing the isVisible value to a boolean.

The static `val` was already being coerced (see line 272) so I just added the coercion to the result of the `visible` function.