add storage type checking to cpdb