Check `nametowindow` return value for C_NULL

(Also rename `has`->`haskey` once... haven't checked for more.)

Should fix the `EXCEPTION_ACCESS_VIOLATION` in https://github.com/kmsquire/VideoIO.jl/issues/32, as well as the segfault noted [here](https://github.com/kmsquire/VideoIO.jl/issues/31#issuecomment-55152203)

At this point, it just throws an error, which is in line with what the rest of the code below it does.  This seems better than a segfault, at least, although I'm wondering if there isn't a better way to handle it (e.g., capturing the window DESTROY event).  But I suspect that's a bigger change.

Cc: @timholy, @Varanas, @maxruby