Check for canvas support before trying to use it