handling canvas null