fix glIsTexture from throwing a warning on null-ified textures, and add testing