throwing exception with message if catalog is null