migrate: Clarify code and fix logic

`!RESStorage.getItem('RES.firstRun.4.3.2.1') && -1` will either return false or -1, never null, so the null case would never be run. Switching to the use of 0 for the case allows us to consistently use integers.