Added additional validation to texture.