wrap storageType in IF