guard against no canvas object