adds handling for nil containers