Check for container parameter before accessing (fixes #5)