This will fail with TypeError if device is not specified. int(None) throws TypeError.