I'm  not sure why you are still checking loc as turf.
There could be an object like the bomb that has its loc abstracted away so if you are using command = 1 it will fail.
locs are guaranteed turfs.