CanvasContext.Type.is* checks to make sure pram is not null